In Exchange, when a user deletes mail from there mailbox, it is retained within the dumpster for the period you have setup in your environment.

There may come a time when you need to clear out the dumpster for a mailbox instead of waiting for XX period of time.

To do this, you need to kick off a Search-Mailbox against the mailbox, here is the command to do so:

Exchange 2010:- remove mail from dumpster for a mailbox

Now if you launch the Exchange Management Shell again while this one is busy, you can run the following command to see the item count decline as it does its thing, here is the command:

Exchange 2010:- remove mail from dumpster for a mailbox

If you want to check a bit more you can run the following command:

  • Get-MailboxFolderStatistics -Identity [email protected] -FolderScope RecoverableItems | Format-Table Name,folderpath,itemsinfolder,folderandsubfoldersize

Hope it helps.

    wpChatIcon

    Discover more from Everything-PowerShell

    Subscribe now to keep reading and get access to the full archive.

    Continue reading