So you’re happily clicking and typing away, and you need to relink a mailbox to another AD user. So you do the obvious:
- Go into the Exchange 2007 Management Console (or Shell)
- Find the mailbox in the Recipient Configuration
- Write down the server the mailbox is stored
- Disconnect the mailbox from the original AD user
- Get a list of disconnected mailboxes on the server you wrote down
Only to find that the mailbox is not listed. Panic!
Did you forget to check the Deletion Settings on the mailbox store? No, on second glance they are the default 30 days, so the disconnected mailbox should still be available.
But, wait… On Exchange 2003, didn’t you run the Cleanup Agent to find disconnected mailboxes?
No such a thing in Exchange 2007, or is there?
Yes there is. Clean-Mailboxdatabase is your cmdlet and friend. Run Clean-Mailboxdatabase <databasename> in an Exchange Management Shell and reload your list of disconnected mailboxes.
You saved the day! Or at least Exchange saved your job ;).
So next time:
- Get-Mailbox email@example.com | Format-Table Name, Database
- Disable-Mailbox firstname.lastname@example.org
- Clean-MailboxDatabase “Mailbox ServerMailbox Database Storagegroup Name”
- Connect-Mailbox -Database “Mailbox Database” -Identity “John Peoples” -User email@example.com