kb

Microsoft Exchange 2010 | Shell | Remove Mailbox

If you remove a Mailbox within the EMC it is still available at the section “detached mailbox”. With the following command you can final remove them. 

The command will change a little bit regarding the deleted state of the mailbox.

With this command you will get every deleted Mailbox:

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

And with this command you can final remove them. The correct MailboxState is important:

Remove-StoreMailbox -database “Name of the Database” -Identity “Value from Identity” -MailboxState Correct MailboxState (Softdeleted or Disabled or Harddeleted,...)