How-to: Removing disconnected Mailboxes from Exchange 2010:
Credit to Spiceworks Community:
https://community.spiceworks.com/how_to/27071-removing-disconnected-mailboxes-from-exchange-2010
1
Run a clean on your mailbox store
Perform the below command in order to run the Clean task on your exchange mailbox store, you need to do this via the Exchange Command Powershell
clean-mailboxdatabase "Mailbox Store Name"
2
Get a list of disconnected mailboxes in your database
Then run the below command to get a list of mailboxes that are in a disconnected state
Get-MailboxStatistics -Database "Mailbox Store Name" | Where-Object {$_.DisconnectDate -Notlike $NULL} | FL DisplayName, DisconnectDate, MailboxGuid
3
Results
You should now see a result similar to the below
DisplayName : USERMAN
DisconnectDate : 1-7-2010 16:00:48
MailboxGuid : def4aabd-2156-5857-858f-470efc3e6f28
4
Gather maxboxguid
Take the MailboxGuid and copy it to Notepad. For easy modification.
The MailboxGuid is needed to remove the mailbox completely, use the below command to remove the mailbox
5
Remove / Delete the mailbox/’s
Now run the below comand inserting the Mailboxguid that you want to remove, repeat the process if you have multiple mailboxes to remove
Remove-Mailbox -Database "Mailbox Store Name" -StoreMailboxIdentity def4aabd-2156-5857-858f-470efc3e6f28
you will now be prompted to confirm that you want to completely remove the mailbox, if you agree accept this prompt.
You can the re run the Get-MailboxStatistics above to check there are no disconnected mailboxes remaining.
6
Verify
to verify the mailboxes are no longer there , re -run the command in step 2, hopefully this will now display zero results.
Job Done !