This article outlines how to force empty the deleted items / recoverable items dumpster in a users mailbox.
To view how much space is consumed by all users dumpster files run this command:
Get-MailBox | Get-MailboxStatistics | select DisplayName,TotalDeletedItemSize
To view an individuals TotalDeletedItemSize, run this command:
Get-MailboxStatistics <alias> | select DisplayName,TotalDeletedItemSize
To view how much white space / available space is in your database run this command:
Get-MailboxDatabase -Status | Sort-Object DatabaseSize -Descending | Format-Table Name, DatabaseSize, AvailableNewMailboxSpace
The idea now is to forcefully delete the TotalDeletedItemSize to increase the AvailableNewMailboxSpace in your mailbox databases.
For this we will use the Search-Mailbox command with the -SearchDumpsterOnly-DeleteContent switch.
This will delete all dumpster items from the users mailbox, which means the user will not be able to retrieve these items form Recover Deleted Items in Outlook
Search-mailbox -identity <alias> -SearchDumpsterOnly -DeleteContent
Very nice stuff – thanks for sharing
I’m now getting this error message when trying to delete all purged items. Any ideas? This has worked in the past
[PS] C:\Windows\system32>Search-mailbox -identity *username* -SearchDumpsterOnly -DeleteContent
Search-mailbox : The term ‘Search-mailbox’ is not recognized as the name of a cmdlet, function, script file, or operabl
e program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:15
+ Search-mailbox <<<< -identity *username* -SearchDumpsterOnly -DeleteContent
+ CategoryInfo : ObjectNotFound: (Search-mailbox:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
apparently, PS isint liking the -deletecontent portion of that cmdlet. I get the following error: a positional parameter cannot be found that accepts argument ‘-deletecontent’
jason you need to have a particular role RBAC assigned to a security group. check technote
http://technet.microsoft.com/en-us/library/ff459253%28v=exchg.150%29.aspx
The below command does not work in using Exchange 2010 SP3 rollup 19 (latest version for SP3)
Search-mailbox -identity -SearchDumpsterOnly -DeleteContent