How can I delete more than 100 quarantined emails at a time using PowerShell?

%3CLINGO-SUB%20id%3D%22lingo-sub-3299072%22%20slang%3D%22en-US%22%3EHow%20can%20I%20delete%20more%20than%20100%20quarantined%20emails%20at%20a%20time%20using%20PowerShell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3299072%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3EI%20currently%20run%20a%20PowerShell%20script%20to%20delete%20quarantined%20emails%20(when%20my%20total%20exceeds%20100%20emails).%20Happy%20to%20do%20this%2C%20but%20it%20seems%20I%20can%20only%20bulk%20delete%20100%20emails%20at%20a%20time.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyone%20find%20a%20work%20around%20for%20this%3F%20Will%20Microsoft%20come%20up%20with%20a%20new%20parameter%20or%20option%20to%20bulk%20delete%20more%20than%20100%20at%20a%20time.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EReason%20I%20ask%20is%20because%20I%20have%20had%20days%20where%20a%20users%20credentials%20are%20compromised%2C%20causing%20the%20quarantine%20log%20to%20explode%20(800%20-%201800%20quarantined%20emails).%20Running%20the%20script%20is%20better%20than%20clicking%20100%20emails%20at%20a%20time%2C%20but%20it%20would%20be%20nice%20to%20have%20the%20option%20to%20delete%20'All'.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EChe%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3299072%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3299103%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20delete%20more%20than%20100%20quarantined%20emails%20at%20a%20time%20using%20PowerShell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3299103%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1370919%22%20target%3D%22_blank%22%3E%40Adin_Calkic%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESame%20here.%20Running%20it%208%20to%2017%20times%20gets%20old.%20Would%20love%20to%20know%20why%20it's%20limited%20to%20100.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3299094%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20delete%20more%20than%20100%20quarantined%20emails%20at%20a%20time%20using%20PowerShell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3299094%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F601551%22%20target%3D%22_blank%22%3E%40CheWeigand%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%3CSPAN%3EAccording%20to%20my%20experience%2C%20you%20are%20limited%20to%20100.%20I%20usually%20re-run%20the%20command.%20Let's%20hope%20it%20changes.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hi All,

I currently run a PowerShell script to delete quarantined emails (when my total exceeds 100 emails). Happy to do this, but it seems I can only bulk delete 100 emails at a time. 

 

Anyone find a work around for this? Will Microsoft come up with a new parameter or option to bulk delete more than 100 at a time.

 

Reason I ask is because I have had days where a users credentials are compromised, causing the quarantine log to explode (800 - 1800 quarantined emails). Running the script is better than clicking 100 emails at a time, but it would be nice to have the option to delete 'All'.

 

Thanks

Che

2 Replies

Hi @CheWeigand ,

According to my experience, you are limited to 100. I usually re-run the command. Let's hope it changes.

@Adin_Calkic 

Same here. Running it 8 to 17 times gets old. Would love to know why it's limited to 100.