Fix Microsoft Purview Compliance Search Purge Not Deleting Messages
Question details
The user is attempting to purge messages using New-ComplianceSearchAction in Microsoft Purview, but the targeted messages remain in the mailboxes even after the purge action reports as completed.
- Product
- Microsoft Purview
- Device & OS
- not provided
- Scenario
- Using PowerShell to hard-delete specific emails across multiple mailboxes based on a compliance search.
- Observed behavior
- The New-ComplianceSearchAction purge command shows a completed status, but emails are not deleted. There is also uncertainty regarding the required syntax for the SearchName parameter.
Ensure you are connected to Exchange Online Security & Compliance PowerShell and that your admin account is assigned the 'Search And Purge' management role.
Use Correct PowerShell Syntax with the -SearchName Parameter
The most common reason for a completed purge action failing to delete emails is omitting the -SearchName parameter or formatting it incorrectly.
When running a purge action, simply typing the purge command without linking it to a specific compliance search will result in the command executing but doing nothing. You must explicitly reference the existing search.
Open Windows PowerShell as an administrator and run 'Connect-IPPSSession' to authenticate your admin session.
Execute the command using the exact SearchName parameter. Type: New-ComplianceSearchAction -SearchName "suspicious emails-3" -Purge -PurgeType HardDelete
Check the detailed progress by running: Get-ComplianceSearchAction -Identity "suspicious emails-3_Purge" | Format-List
Account for Processing Delays and Service Limits
Purge actions can take several hours to reflect across all mailboxes, and they are subject to specific item limits per mailbox.
Switch to WPS Office for a Streamlined Document Experience
While Microsoft Purview is essential for enterprise compliance and Exchange administration, WPS Office provides a robust, free, and lightweight alternative for your daily document creation and editing needs. Avoid heavy subscription overhead while maintaining full compatibility.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button.
- 2. Install the Software: Run the downloaded executable file and follow the simple on-screen instructions.
- 3. Open and Edit: Launch WPS Office and immediately open your existing Microsoft Office files with zero formatting loss.

Frequently Asked Questions
Why does the compliance search purge say completed but emails are still there?
This typically occurs if the '-SearchName' parameter was omitted from the command, meaning the purge action didn't target the intended search results. It can also happen due to background processing delays or the hard limit of 10 deleted items per mailbox per purge.
How do I check the detailed status of my purge action in Microsoft Purview?
You can verify the status by connecting to Security & Compliance PowerShell and running the command: Get-ComplianceSearchAction -Identity "YourSearchName_Purge" | Format-List.
Do I need special permissions to purge messages in Microsoft 365?
Yes, your admin account must be explicitly assigned the 'Search And Purge' management role in the Microsoft Purview compliance portal. Global Administrator rights alone do not grant this specific permission by default.




