Tuesday, October 21, 2014

Deleting Items from Mailbox Dumpster

Hi folks,

Let me share with you about another task that you usually don't do on day to day basis.

As an intro I would love to share with you link to this article which explains what is Dumpster 2.0 is and how it is used in Exchange 2010 and 2013 environments. In couple words, after being deleted messages are being stored in dumpster for further restore and legal purposes.

Every now and then we need to delete items from dumpster to free up space used by them. Please note that this will create white space in the mailbox which can be reused for the new messages that arrive to the mailbox.

To check how much deleted messages are stored in mailbox you can run command like this:

Get-MailboxStatistics "Farhad Mahmudov" |select *size*

or even a nicer one like this

Get-MailboxStatistics "Farhad Mahmudov" |select DisplayName,TotalDeletedItemSize,TotalItemSize

In any case you will have information of how much data you have in mailbox altogether as well as deleted items size:



To remove data from dumpster you need to run the Search-Mailbox command with parameters as follows and confirm when prompted:

Search-Mailbox -Identity "Farhad Mahmudov" -SearchDumpsterOnly -DeleteContent

This may take some time depending on how much data you have in Recovered Items folder (dumpster) and give you output on how much data has been removed from the mailbox.



Optionally, you can double check this by running Get-MailboxStatistics command.

Enjoy.