Exchange 2010 SP1: delete separate mailboxes

With Service Pack 1 for Exchange Server 2010, something has changed with regard to separate mailboxes. There is a new CMDlet with which separate mailboxes can be deleted. With Exchange 2010 without Service Pack 1 this worked as follows here described via "Remove-Mailbox"

Since Service Pack 1 for Exchange 2010, the CMDlet "Remove-StoreMailbox" has been added. The new CMDlet is only responsible for disconnected mailboxes. Active (online) mailboxes cannot be deleted with it.

The procedure initially remains the same as for "Remove-Mailbox":

If the user associated with a mailbox has only recently been deleted, the disconnected mailbox will not be displayed directly in the list of disconnected mailboxes in the Exchange administration console. If you do not want to wait until Exchange automatically searches for disconnected mailboxes, you can initiate this yourself using the following command:

Get-MailboxDatabase | Clean-MailboxDatabase

The disconnected mailboxes are then displayed in the Exchange administration console, where they can be reconnected but not deleted. The mailbox can only be deleted via the GUID of the mailbox. This can be displayed as follows:

get-mailboxdatabase | get-mailboxstatistics | Where{ $_.DisconnectDate -ne $null } |fl displayName,Identity,disconnectdate,database

The new CMDlet continues from here:

Remove-StoreMailbox -database "Name of the database" -Identity "Value of the identity" -MailboxState SoftDeleted

Example:

Remove-StoreMailbox -database "MBDB01" -Identity "bcfd82dc-0b14-4ee3-aceb-f369159ddbc1" -MailboxState SoftDeleted

The example deletes a mailbox which has the status "SoftDeleted". A deactivated mailbox is deleted by setting the "-MailBoxState" parameter to "Disabled".

Example:

Remove-StoreMailbox -database "MBDB01" -Identity "bcfd82dc-0b14-4ee3-aceb-f369159ddbc1" -MailboxState Disabled

I will describe the differences between SoftDeleted and Disabled in the next article.

5 thoughts on “Exchange 2010 SP1: getrennte Postfächer löschen”

  1. Hallo Frank,
    sehr schöne zusammenhängende Infos, genau das was ich brauche.
    Leider gibt es den Clean-MailboxDatabase auf Exchange 2016 nicht.
    Eine Vorgehensweise hierzu habe ich nicht gefunden.
    Mein Ziel ist es den gesamten Inhalt der User Mailbox zu leeren um einen fehlgeschlagenen PST Import erneut zu starten.

    Reply

Leave a Comment