• To do this you must open up the Exchange Management Shell on Exchange 2007.  Then at the prompt you will want to find the GUID for the mailbox you wish to delete.  You can do this by typing the following command:

    Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid

    You should then see a prompt like this.

    To remove individual mailboxes use the  following command with your servers info replaced in bold:
    Remove-Mailbox -Database “Database-Name” -StoreMailboxIdentity MailboxGuid -confirm:$false

    After this runs check to see if the GUID is gone by running the “Get-MailboxStatistics” command again.  After this has been run the mailbox has been removed from the system.

    To remove all disconnected mailboxes use the following commands, please note replace “Mailbox Store” with your information.

    This command will query the current disconnected mailboxes.
    $users = Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid

    This command will use the query to remove the mailboxes.
    $users | ForEach { Remove-Mailbox -Database “Mailbox Store” -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }

    – Harry Caskey

    Posted by Harry Caskey @ 16:50

    Tags: , ,

1 Comment to Delete Disconnected Mailbox from Exchange 2007

Leave a Reply

Your email address will not be published. Required fields are marked *

-->