Attach a disconnected online archive to a user mailbox

I have been migrating some users to a new Active Directory domain and part of this has involved converting linked mailboxes to user mailboxes within Exchange. Reconnecting a disconnected mailbox doesn’t include the archive, this needs to be done manually. Before I can reconnect it I need to know what it is called, so can get a list of disconnected mailboxes with the following PowerShell command:

Get-MailboxDatabase | Get-MailboxStatistics | Where-Object {$_.DisconnectDate}

I can then reconnect the appropriate archive mailbox by incorporating the Connect-Mailbox cmdlet:

Get-MailboxDatabase | Get-MailboxStatistics | Where-Object {$_.DisconnectDate -And $_.DisplayName -Eq "Personal Archive - Dave Webb"} | Connect-Mailbox -User dave.webb -Archive

If the online archive doesn’t appear in Outlook straight away the following command is useful for speeding things up:

Get-MailboxDatabase | Clean-MailboxDatabase
[BlogBookmark] [Blogsvine] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [LinkedIn] [MySpace] [Reddit] [Slashdot] [StumbleUpon] [Twitter] [Windows Live] [Yahoo!] [Email]