Connecting the Disconnected in Exchange 2010

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

This entry was posted in Exchange Server and tagged , by Michel de Rooij. Bookmark the permalink.
Unknown's avatar

About Michel de Rooij

Michel de Rooij is a Microsoft MVP, architect, author, and speaker with over 25 years of experience in Microsoft messaging, identity, and collaboration technologies. He specializes in Microsoft Exchange, Exchange Online, and email security, with a strong focus on architecture, migration, automation, and practical solutions. Michel has authored several Microsoft Exchange books, including Pro Exchange Server Administration, and contributes to the Office 365 for IT Pros series. A Microsoft MVP since 2013, he regularly shares his knowledge, tools, and real-world experience with the Microsoft community.

Leave a Reply