My article for Simple-Talk on mailbox and personal archive deletion, recovery and purging in Exchange 2010 has been published on Simple Talk.
The article is about:
- The relationships between Active Directory and Mailboxes and Archives in the store;
- Mailbox Retention;
- Deleting and Recovering a Mailbox
- Deleting and Recovering a Personal Archive
- Linked Mailboxes
- Cleanup
You can check out the article, titled Connecting the Disconnected in Exchange 2010, at:
http://www.simple-talk.com/sysadmin/exchange/connecting-the-disconnected-in-exchange-2010/
Note: I submitted the following additional SP1 info to the publisher so this information might be included in the article at some point.
Since writing the article SP1 was released which contains a new cmdlet to purge mailboxes, Remove-StoreMailbox. This is also great for situations when you’ve moved a lot of mailboxes and you need to make that space available in the source database (when moved, mailboxes are soft-deleted). Usage is as follows:
Remove-StoreMailbox -Database <DatabaseID> -Identity <MailboxID> -MailboxState [Disabled|SoftDeleted]
For example, to remove pmortimer’s mailbox from database DB1 after moving it elsewhere, use:
Remove-StoreMailbox –database DB1 –identity pmortimer –MailboxState SoftDeleted
The command to remove all SoftDeleted mailboxes from database DB1 would be:
Get-MailboxStatistics -Database DB1 | where {$_.DisconnectReason -eq “SoftDeleted”} | foreach {Remove-StoreMailbox -Database $_.database -Identity $_.mailboxguid -MailboxState SoftDeleted}
The new Remove-StoreMailbox cmdlet also enables us to use single command for removing all disconnected mailboxes:
Get-MailboxStatistics –Database DB1 | Where-Object {$_.DisconnectReason –eq “Disabled”} | ForEach {Remove-StoreMailbox –Database $_.database –identity $_.mailboxguid –MailboxState Disabled