Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue removing large deleted items folder's contents

Status
Not open for further replies.

DrB0b

IS-IT--Management
May 19, 2011
1,425
US
Hello All,
We have a user our exchange admin let slip through the cracks. He has eaten almost 115gb of space and about 100gb of it is in the Sent and Deleted folders. We are having an issue getting rid of these. Tried the obvious of right click on the Deleted folder and told it to empty but it errors out. Tried selecting a larger amount and deleting manually and no luck. Is there any Powershell command I am missing that can assist in bulk deletion of these?

Learning - A never ending quest for knowledge usually attained by being thrown in a situation and told to fix it NOW.
 
Ended up going with the following queries. This one just gave you the results that could be deleted: search-mailbox YourUserName -SearchQuery {Received:"3/1/2022..4/1/2022"} -EstimateResultOnly

This one with the changed last flag actual does the deletion: search-mailbox YourUserName -SearchQuery {Received:"3/1/2022..4/1/2022"} -DeleteContent

This basically allowed us to delete around 10,000 emails at a time which in our case was around 8.5 - 10GB of data a swoop. Did this for a few months and got his mailbox back in line.

Learning - A never ending quest for knowledge usually attained by being thrown in a situation and told to fix it NOW.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top