Purge all disconnected mailboxes in Exchange 2007




Purge all disconnected mailboxes in Exchange 2007
If you want to purge all your mailboxes in Exchange 2007, simply follow the below:
 
1) Open 'Exchange Management Shell'
 
2) Add all the disconnected mailboxes into a var by typing the below:
 
$users = Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid,Database
 
3) Purge all the disconnected mailboxes in the previously made var by typing the below:
 
$users | ForEach { Remove-Mailbox -Database $_.Database -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }


No one has said that they like article yet, be the first and click here (0)
Send a link to this page via email Send a link to this page