logo
search
Compliance Problems

Fix Microsoft Purview Compliance Search Purge Not Deleting Messages

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

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.
Before you start

Ensure you are connected to Exchange Online Security & Compliance PowerShell and that your admin account is assigned the 'Search And Purge' management role.

Solution 1Recommended

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.

1
Connect to PowerShell

Open Windows PowerShell as an administrator and run 'Connect-IPPSSession' to authenticate your admin session.

2
Run the Purge Command

Execute the command using the exact SearchName parameter. Type: New-ComplianceSearchAction -SearchName "suspicious emails-3" -Purge -PurgeType HardDelete

3
Verify the Action Status

Check the detailed progress by running: Get-ComplianceSearchAction -Identity "suspicious emails-3_Purge" | Format-List

Syntax Requirement: The SearchName parameter is mandatory to define which search results should be targeted by the purge operation.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and click the free download button.
  2. 2. Install the Software: Run the downloaded executable file and follow the simple on-screen instructions.
  3. 3. Open and Edit: Launch WPS Office and immediately open your existing Microsoft Office files with zero formatting loss.
Fully compatible with Microsoft Word, Excel, and PowerPoint file formats.Lightweight application footprint with rapid loading and editing speeds.Free to use with a familiar, highly intuitive tabbed interface.Seamless cross-platform support for Windows, Mac, Linux, iOS, and Android.
microsoft office alternative - wps office

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.