Show deleted mailboxes in “Disconnected Mailbox”
2009-06-24 2 Comments
I noticed yesterday that I could not see a previously deleted mailbox in “Disconnected Mailbox” In EMC. After some digging it hit me that maybe it takes a while before the mailbox will show. Since I didn’t have time to wait I used the following command to find the mailbox:
Clean-MailboxDatabase <DatabaseName>
This forces Exchange to scan the database for disconnected mailboxes. When the command was finished the mailbox showed up in EMC and I where able to restore it. Problem solved…
What if I want to use EMS to show the disconnected mailboxes? Then you use the following command:
Get-MailboxStatistics -Server <ServerName> | where { $_.DisconnectDate -ne $null } | select DisplayName,DisconnectDate,DatabaseName
And use this command to re-connect the mailbox:
Connect-mailbox –database <DatabaseName> –Identity <DisconnectedMailboxName> –User <ConnectToUser>

A good thing to have at hand is a general cleaning “tool” like:
Get-MailboxServer | Get-MailboxDatabase | Clean-MailboxDatabase
I have problems remembering whitch database the mailbox resided in but I always remember the mailbox server at least. ;-)
Cheers,
Jesper
Thats a good tip Jesper. It is as you say, easier to just run the command for all mailboxes on that specific server if you have a lot of users. Thanks for the comment! :)