troubleshooting Question

Deleting large volume of email from a shared mailbox deleted items folder

Avatar of carbonbase
carbonbaseFlag for United Kingdom of Great Britain and Northern Ireland asked on
ExchangeMicrosoft 365Powershell
25 Comments1 Solution30 ViewsLast Modified:
The users of one of our shared (Office365) mailbox have allowed items in the deleted items folder to grow to over 200,000 items.  They are now trying to empty the deleted items folder but are finding they cannot as Outlook hangs.  

I have been looking online for a way to do this in Powershell and have come across this command:

Search-Mailbox -Identity username -SearchQuery '#deleted items#' -DeleteContent
I tried it without the '-DeleteContent' switch at the end so I could test it before deleting anything, but I get an error "The target mailbox or .pst file path is required.", even though I changed the '-Identity' value to my shared mailbox.

I would like some advise on how to get this, or another query working so I can clear out the deleted items folder.

Thanks in advance.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 25 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 25 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros