Recently I ran into a situation where I had disconnected several users primary and archive mailboxes and had to reconnect them. Initially I only reconnected the primary mailboxes, and later I decided to reconnect the archives. For all my 2010 mailboxes, the following command worked perfectly:

Connect-Mailbox -Identity <DisplayName/GUID> -Database <database> -Archive

Note: I did not specify the user to connect to as it uses the LegacyExchangeDN and DisplayName attributes of the mailbox to match to an existing user account

However, when I went to do the same for my Exchange 2013 users, I ran into this:

An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.

Er, Ok, that’s interesting. Quick call to Microsoft. Turns out the way to connect an archive mailbox has changed in 2013 but the document found on TechNet incorrectly says to use the Connect-Mailbox cmdlet. Instead, use the Enable-Mailbox cmdlet with the disabled archive’s GUID:

Enable-Mailbox -ArchiveGuid 249c99bd-10b9-40cd-8ec8-8f6f5aa483c9 -ArchiveDatabase Archive1 -Identity Avtar.Ellwood

And now the archive is reconnected. Another odd issue that I ran into both at work and in my home lab is the DisabledArchiveGuid on the mailbox after reconnection was blank:

According to Microsoft support, this is supposed to be populated with the archive mailbox GUID for easy reconnection. I disabled and reconnected several test accounts and the results were mixed, sometimes it was there, sometimes it was not. So how do you find the GUID to reconnect the archive mailbox? Use the Get-MailboxStatistics command and specify the archive database (or server name) and search for the user’s name:

If you want to list all the disconnected mailboxes for a database, change the Where statement to include DisconnectDate:

Get-MailboxStatistics -Database Archive1 | ? {$_.DisconnectDate -ne $NULL}

Leave a Reply