To run the Clean-MailboxDatabase cmdlet, the account you use must be delegated the Exchange Organization Administrator role.
For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.
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 is not 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 reconnect a disconnected mailbox to an Active Directory user account, use the Connect-Mailbox cmdlet.
If you want to permanently remove a mailbox object from the Exchange store, use the Remove-Mailbox cmdlet.
Under normal circumstances, it is not necessary to run Clean-MailboxDatabase 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 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.
Note: |
|---|
|
You can run the Clean-MailboxDatabase cmdlet in Microsoft Exchange Server 2007 to achieve the same results as the Run Cleanup Agent action in the Exchange Server 2003 System Manager. To run the cleanup agent, in Exchange System Manager, expand Servers, expand the server name, expand the storage group name, expand the mailbox database name, right-click Mailboxes, and select Run Cleanup Agent.
|
For more information, see the following topics: