Soft deleted mailbox

After performing actions such as removing a mailbox or moving a mailbox from one database to another, a copy of this mailbox will remain on the database for a period of time using valuable space. This is called a soft-deleted mailbox and they can be easily removed so you can clear that exchange white space. In some instances, you have performed one of these tasks of removing a mailbox for the purpose of clearing space in your Exchange database, Only to find that the mailbox is still using this space. To reclaim this space back your will need to remove the soft-deleted mailbox by using just a couple of easy Exchange PowerShell commands.

First lets check to find out which mailboxes are soft deleted on a particular Database.

To do this you will open the Exchange PowerShell module. The command will display the info will be the Get-MailboxStatistics command. The full command you will run is displayed below.

Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -ne $null } | fl DisplayName,MailboxGuid,Database,DisconnectReason

Once the command is run you will see a list of mailboxes that are soft deleted and can be removed.

Output example

Now you will know which mailboxes that you can go ahead and remove.

To so this use the Remove-StoreMailbox command

Remove-StoreMailbox –Database Databasename –Identity “Username” –MailboxState SoftDeleted

Once you have removed this you can run the following command to see how much space the deletion has created.

get-mailboxdatabase -status | ft name,availablenewmailboxspace

Leave a Reply

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