Right so the dumpster is the hidden place to store messages after those messages are deleted, this is invisible to the user as well as the GUI, for this you need PowerShell.
There is a maximum size for this "dumpster" after which the mailbox will behave weirdly for example not allowing calanders to be managed, or not being able to move messages to subfolders of the inbox, there are simple action to do and there are also not simple action that require a little more powershell to fix.
Then you need this command:
You will need to confirm you are not hitting the limit for the mailbox, in EXO that is 99GB, if on premises you will need to refer to your own database mailbox limits
You then need to check the deleted item size of the whole mailbox with that command:
Optional : If you have archiving enabled you will need to run this as well:
You now need to get the dumpster space :
Optional : If you have archiving enabled you will need to run this as well:
Purge the Dumpster
If you wish to purge the dumpster after you have either not been able to do the above or just need the command then its this:
The diagram below shows what we are talking about, the section at the bottom in blue is what we are talking about querying and if required to purge:
There is a maximum size for this "dumpster" after which the mailbox will behave weirdly for example not allowing calanders to be managed, or not being able to move messages to subfolders of the inbox, there are simple action to do and there are also not simple action that require a little more powershell to fix.
Get-Mailbox <mailbox> | Get-MailboxFolderStatistics | Select-Object Identity, {$_.FolderAndSubFolderSize.ToMb()}, ItemsInFolderAndSubFoldersThis will give you a view like this, that shows you all the subfolders, so that the user cannot see and how many items are in the subfolders, notice that the "Deleted Items" for this mailbox is "0" as that is not where we need to look....
Check the space utilization
We are interested in the bottom couple of folders, this is also part of the dumpster data as well, notice we have lots of deletion in these folders:
Then you need this command:
Get-MailboxStatistics -Identity <mailbox> | Select DisplayName,ItemCount,TotalItemSizeYou will need to confirm you are not hitting the limit for the mailbox, in EXO that is 99GB, if on premises you will need to refer to your own database mailbox limits
You then need to check the deleted item size of the whole mailbox with that command:
Get-MailboxStatistics -Identity <mailbox> | select DisplayName,TotalDeletedItemSizeOptional : If you have archiving enabled you will need to run this as well:
Get-MailboxStatistics -Identity <mailbox> -Archive | select DisplayName,TotalDeletedItemSizeYou now need to get the dumpster space :
Get-MailboxFolderStatistics -Identity <mailbox> -FolderScope RecoverableItems | Select Identity,ItemsInFolder,FolderAndSubfolderSizeOptional : If you have archiving enabled you will need to run this as well:
Get-MailboxFolderStatistics -Identity <mailbox> -Archive -FolderScope RecoverableItems | Select Identity,ItemsInFolder,FolderAndSubfolderSizeThis will return something like this and you will see where the space is being used in the dumpster as below:
Identity ItemsInFolder FolderAndSubfolderSize
-------- ------------- ----------------------
oversized@bears.local\Recoverable Items 0 41.49 GB (44,553,447,576 bytes)
oversized@bears.local\Audits 92080 741.4 MB (777,383,734 bytes)
oversized@bears.local\Calendar Logging 0 0 B (0 bytes)
oversized@bears.local\Deletions 68817 23.81 GB (25,570,328,273 bytes)
oversized@bears.local\DiscoveryHolds 0 0 B (0 bytes)
oversized@bears.local\Purges 47003 16.92 GB (18,168,838,344 bytes)
oversized@bears.local\SubstrateHolds 0 0 B (0 bytes)
oversized@bears.local\Versions 8 35.19 MB (36,897,225 bytes) You now need to get some statistics about that mailbox to figure out your options with this command:
Right as you can see here, we have Litigation Hold enabled, which can cause issues when he dumpster fills up as mail cannot be "deleted" from the mailbox its needs to be held until this is removed, however if the dumpster fills up the mailbox can be unmanageable.
Get-Mailbox -Identity <mailbox> | Format-List DisplayName,Name,IsInactiveMailbox,LitigationHoldEnabled,LitigationHoldDuration,InPlaceHolds,RetentionHoldEnabled,RetentionPolicyThat will return this:DisplayName : Oversized
Name : Oversized
IsInactiveMailbox : False
LitigationHoldEnabled : True
LitigationHoldDuration : Unlimited
InPlaceHolds : {}
RetentionHoldEnabled : False
RetentionPolicy :
Right as you can see here, we have Litigation Hold enabled, which can cause issues when he dumpster fills up as mail cannot be "deleted" from the mailbox its needs to be held until this is removed, however if the dumpster fills up the mailbox can be unmanageable.
Disable Litigation Hold
If you have the option to disable Litigation Hold you can do so with this command:
If you have the option to disable Litigation Hold you can do so with this command:
Set-Mailbox –Identity <mailbox> -LitigationHoldEnabled $falseOptional : Set Retention Policy
However once done you still need to clear the mailbox down, if this is something that needs to be managed you can set a retention policy on the mailbox, notice this mailbox does not have one, that the "RetentionPolicy" tag from above, to set one for a single mailbox this is the command:
Note : Replace the <Policy Name> with the name of your policy, which can be obtained with the command Get-RetentionPolicy
However once done you still need to clear the mailbox down, if this is something that needs to be managed you can set a retention policy on the mailbox, notice this mailbox does not have one, that the "RetentionPolicy" tag from above, to set one for a single mailbox this is the command:
Note : Replace the <Policy Name> with the name of your policy, which can be obtained with the command Get-RetentionPolicy
Set-Mailbox –RetentionPolicy <Policy name>However if you wish to assign this to all mailboxes you can use this command instead:
$UserMailboxes = Get-Mailbox -Filter {(RecipientTypeDetails -eq 'UserMailbox')}
$UserMailboxes | Set-Mailbox –RetentionPolicy <Policy name>If you are running commands from a blog, without understanding what they do, then you will need this command after you realised that the last command applied that policy to all mailboxes 😭$UserMailboxes = Get-Mailbox -Filter {(RecipientTypeDetails -eq 'UserMailbox')}
$UserMailboxes | Set-Mailbox –RetentionPolicy $NullOnce you have set the retention policy that will automatically start processing later in the day, however to force then use this command:
Start-ManagedFolderAssistant <mailbox> -FullCrawlEnable Archiving
Another way to get space back to is enable archiving if you have a license in EXO or the space on Exchange and you have an archive database setup, if you enable the archive then the dumpster can utilise that as well which means your mailbox will return back to being useable.
NOTE : If you are Hybrid you will need these changes to replicate from AD via AD-Connect before they become live
Another way to get space back to is enable archiving if you have a license in EXO or the space on Exchange and you have an archive database setup, if you enable the archive then the dumpster can utilise that as well which means your mailbox will return back to being useable.
NOTE : If you are Hybrid you will need these changes to replicate from AD via AD-Connect before they become live
If you wish to enable archiving for one user, you can run this:
If you wish to enable archiving for all users with it off, you can run this:
Enable-Mailbox -Identity <mailbox> -ArchiveIf you wish to enable archiving for all users with it off, you can run this:
Get-Mailbox -Filter {ArchiveGuid -Eq "00000000-0000-0000-0000-000000000000" -AND RecipientTypeDetails -Eq "UserMailbox"} | Enable-Mailbox -ArchivePurge the Dumpster
If you wish to purge the dumpster after you have either not been able to do the above or just need the command then its this:
Search-Mailbox -Identity <mailbox> -SearchDumpsterOnly –DeleteContentOptional : For an archived dumpster you need to use this:Search-Mailbox -Identity <mailbox> -Archive -SearchDumpsterOnly –DeleteContent🚒