Tuesday , November 19 2019

How to Clean up a Mailbox or Clean up the Dumpster using Discovery Search in Exchange 2010

Updated – Supports Exchange 2010/2013 and Exchange 2016

Lets say I want to Clean up a Users mailbox completely to have a fresh Start.

We can use Discovery Search to do this task

First Assign the Permissions which is required to use discovery Search – Refer Below link

https://www.azure365pro.com/deleting-a-specific-email-from-entire-organization-in-exchange-2010-2/

I just Created a Test user with Few mails and Few Items in his dumpster

image

Get-MailboxFolderStatistics -Identity "User2" -FolderScope RecoverableItems | Format-Table Name,FolderPath,ItemsInFolder,FolderAndSubfolderSize

image

Now am doing a search query with a wildcard to query everything and deleting it completely including the archive mailbox

Get-mailbox "User1"| search-mailbox –searchquery "Subject:'*'" –DeleteContent

Caution : Its going to Clean up the Archive Mailbox as well

Use this command for not to include archive

Get-mailbox "User1"| search-mailbox –searchquery "Subject:'*'" –DeleteContent -<em>DoNotIncludeArchive

 

Use this command to delete Dumpster alone

Get-mailbox "User1"| search-mailbox –searchquery "Subject:'*'" –DeleteContent -<em>SearchDumpsterOnly</em>

image

Now mailbox is cleaned up completely including the dumpster

Get-MailboxFolderStatistics -Identity "user1" -FolderScope RecoverableItems | Format-Table Name,FolderPath,ItemsInFolder,FolderAndSubfolderSize

image

If you feel its too confusing –  Check out the Automated Script to do these tasks for you

Discovery Search Simplified Script to Delete a Specific Email and other Tasks – Exchange 2010

 

About Satheshwaran Manoharan

Satheshwaran Manoharan is an Microsoft Office Server and Services MVP , Publisher of Azure365pro.com. Specialized in Office365 / Microsoft Exchange / Virtualization , Sathesh is an Messaging Expert supporting/Designing/Deploying many medium size businesses to large enterprises when it comes to Corporate messaging and Virtualization Infrastructure

Check Also

DNS Prerequisites for Cross Forest Migration

Lets see how to create a conditional Forwarder in Microsoft DNS and inflobox to Create ...

4 comments

  1. This website is great

  2. For some reason when I run the cmdlet to delete contents of dumpster, it tells me the target mailbox path is required

  3. free oculus rift

    Hello, I enjoy reading all of yopur article. I wanted to write a little comment to support you.

  4. junk. deprecated months ago.

Leave a Reply

Your email address will not be published.