Thursday, 19 February 2009

Exchange 2007 - How to Purge Disconnected Mailbox

A feature that took me a little while to click onto was the process of purging Mailboxes. In Exchange 2003 it was simple, delete the user, enter the exchange console, run the cleanup agent and then purge or reconnect.

In exchange 2007 this ability seems to have left the Exchange console and entered the shell world...

Should you face this scenario of having to rebuild an Exchange Mailbox the process of purging is as follows, firstly remove the mailbox in the Exchange console as normal then enter the Exchange Management Shell.

You need to run two commands (Remember - Case Sensitive):

List all of the disconnected mailboxes in the domain so you can find the GUID.
Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid

Then modify the following command with the GUID of the Mailbox you wish to delete:
Remove-Mailbox -Database "Mailbox Database" -StoreMailboxIdentity -confirm:$false

Be careful though when deleting Exchange Mailboxes before you even get to the purging stage make sure you don't accidently delete the user account which is very possible in Exchange now that it has the added Active Directory Integration.

Did I solve your problem? Buy me a virtual beer by clicking on a Google ad :). Thanks!

1 comment:

  1. Hehe, just had to use this - thanks :-)

    Googled 'exchange 2007 purge mailbox' and saw a familiar name!


Bulk discount code 2022 - 35% Off First Order Discount Code at / Bulk Ltd - First Order Discount Code!  Get 35% off of your first order at Bulk, home of award-winning Sports Supplements, high ...