Mario from this week’s 10135 exchange 2010 class asked..
“I used to use the Exchange clean up agent in 2003 all the time, is there something equivalent in 2010?”
We sure do! There is a Cmdlet we can run to force a similar process. We can use the Clean-MailboxDatabase to do this same type of process. Let’s consult TechNet on what it actually does..
Use the Clean-MailboxDatabase cmdlet to scan Active Directory for disconnected mailboxes that aren’t yet marked as disconnected in the Microsoft Exchange store and update the status of those mailboxes in the Exchange store. This cmdlet isn’t able to update the Exchange store unless the Microsoft Exchange Information Store service is running and the database is mounted.
A connected mailbox has two parts: the mailbox object in the Exchange store and the user object with Exchange properties in Active Directory. A disconnected mailbox is the mailbox object in the Exchange store, but it isn’t connected to a user object in Active Directory. To disconnect a mailbox, use the Disable-Mailbox cmdlet. To disconnect a mailbox and remove the user object from Active Directory, use the Remove-Mailbox cmdlet. If you want to permanently remove a mailbox object from the Exchange store, use the Remove-Mailbox cmdlet.
If you want to reconnect a disconnected mailbox to an Active Directory user account, use the Connect-Mailbox cmdlet.
Under normal circumstances, it isn’t necessary to run the Clean-MailboxDatabase cmdlet because a mailbox is marked as disconnected immediately after the Disable-Mailbox or Remove-Mailbox command completes. If you used the Disable-Mailbox cmdlet or the Remove-Mailbox cmdlet while the Microsoft Exchange Information Store service was stopped, or if a mailbox was disabled by an external means other than the Disable-Mailbox cmdlet or Remove-Mailbox cmdlet, you may want to use the Clean-MailboxDatabase cmdlet to scan for disconnected mailboxes.