How to Delete More Than 60,000 Emails in Microsoft 365
Question details
The user needs to permanently remove a massive volume of emails (over 60,000 messages) across multiple mailboxes in Microsoft 365 but is encountering system limits.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Attempting to bulk-delete over 60,000 spam or malicious emails using a PowerShell loop with New-ComplianceSearchAction alongside Purge and HardDelete flags.
- Observed behavior
- The PowerShell script fails to remove all target messages because Microsoft 365 enforces strict per-mailbox and operational limitations on compliance search purge actions.
Ensure you are assigned the 'Search And Purge' role in the Microsoft Purview compliance portal and verify your search criteria thoroughly to prevent accidental deletion of legitimate communications.
Use Microsoft Defender for Office 365 Bulk-Remediation Tools
Utilize Microsoft Defender's specialized bulk-remediation feature, which is designed to handle massive email incidents beyond standard PowerShell limits.
Microsoft Defender for Office 365 provides advanced threat investigation and remediation capabilities. Its Explorer tools allow administrators to safely and effectively hard-delete tens of thousands of malicious or spam emails without hitting the restrictive 10-item-per-mailbox limit of standard compliance searches.
Log in to the Microsoft 365 Defender portal (security.microsoft.com) using your global or security administrator credentials.
In the left-hand navigation pane, go to Email & Collaboration and select Explorer (or Threat Explorer).
Use the search queries, date ranges, and sender filters to isolate the 60,000+ messages you need to remove from your tenant.
Select the checkbox for all targeted messages, click the 'Take action' button, choose 'Hard delete', and follow the prompts to initiate the bulk remediation process.

Optimize PowerShell Compliance Search and Purge Commands
If you do not have access to Microsoft Defender tools, you must segment your PowerShell purge operations into smaller batches to respect tenant limits.
Contact Microsoft Support for Backend Assistance
For exceptionally large cleanup operations where built-in limits prevent a timely resolution, request backend assistance from Microsoft.
Experience a Free and Lightweight Office Suite with WPS Office
Managing complex administrative limits in Microsoft 365 can be challenging. When it comes to everyday productivity, WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office for creating, editing, and sharing documents effortlessly.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the Suite: Run the installer and follow the quick setup wizard to complete the installation.
- 3. Open Your Files: Launch WPS Office and directly open your existing Microsoft Office files (.docx, .xlsx, .pptx) to continue working seamlessly.

Frequently Asked Questions
Why does New-ComplianceSearchAction fail to delete all 60,000 emails at once?
Microsoft 365 enforces a strict limit on the New-ComplianceSearchAction -Purge command to protect server performance. It allows a maximum of 10 items to be purged per mailbox at one time, making bulk deletions of massive scale difficult via standard compliance tools.
What is the difference between SoftDelete and HardDelete in Microsoft 365?
SoftDelete moves the targeted items to the Recoverable Items folder, where they can still be recovered by administrators or users until the retention period expires. HardDelete marks the items to be permanently purged from the Exchange database, making them largely unrecoverable.
Can I bypass the 10-item purge limit using Security & Compliance PowerShell?
No, the 10-item limit per mailbox is a hard server-side limit. To bypass this, you must either script a loop to repeat the purge action continuously or use Microsoft Defender for Office 365 bulk-remediation tools.
What permissions do I need to hard delete emails in Microsoft 365?
To search for and purge messages, your account must be assigned the 'Search And Purge' management role. This is typically achieved by adding your account to the eDiscovery Manager role group in the Microsoft Purview compliance portal.




