Fix PowerShell Purge Parameter Missing in New-ComplianceSearchAction
Question details
The user is unable to use the Purge parameter with the New-ComplianceSearchAction cmdlet to remove phishing emails, as PowerShell returns an error stating no such parameter exists.
- Product
- Microsoft 365 / Microsoft Purview
- Device & OS
- not provided
- Scenario
- Attempting to hard-delete or purge malicious and phishing emails from user mailboxes using Security & Compliance PowerShell.
- Observed behavior
- The New-ComplianceSearchAction cmdlet fails to execute, returning an error that no parameter matches the name 'Purge'.
Ensure you are connected to the Security & Compliance PowerShell module using an administrator account, and verify that the Microsoft Purview service is currently active without ongoing service degradation.
Open a Microsoft 365 Support Request for Backend Investigation
This issue is often caused by backend log discrepancies or updated Microsoft Purview procedures that require direct intervention from Microsoft Technical Support.
When built-in cmdlet parameters like 'Purge' unexpectedly go missing despite proper module installation, it typically indicates a backend sync issue within your Microsoft 365 tenant. A Global Administrator must authorize a backend investigation to restore functionality.
Log in to the Microsoft 365 admin center using a Global Administrator account.
Click on 'Support' in the left-hand navigation menu, then select 'Help & support'.
Briefly describe the 'New-ComplianceSearchAction missing Purge parameter' issue. Follow the prompts to skip the automated solutions and click 'Contact Support'.
Request that the Microsoft Technical Support team investigate the backend logs for your tenant regarding Purview's Search and Purge capabilities.
Verify Your Account Has the 'Search And Purge' Role Assigned
PowerShell dynamically hides cmdlet parameters if your account lacks the necessary Role-Based Access Control (RBAC) permissions to use them.
Streamline Your IT Documentation with WPS Office
While resolving Microsoft 365 backend PowerShell issues requires Microsoft Support, you can rely on WPS Office for all your IT administration reporting and document creation. It serves as a lightweight, highly compatible, and free alternative to Microsoft Office.
- 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install WPS Office: Run the setup file and follow the on-screen instructions to complete the fast installation process.
- 3. Open and Edit Your Documents: Launch WPS Office to instantly open, edit, and save your existing Microsoft Office files without formatting loss.

Frequently Asked Questions
Why does PowerShell say 'A parameter cannot be found that matches parameter name'?
This error occurs in PowerShell when the cmdlet exists, but the specific parameter is either deprecated in your current module version, misspelled, or hidden by the system due to missing RBAC permissions for your user account.
What is the 'Search And Purge' role in Microsoft 365?
The 'Search And Purge' role is a specific permission within Microsoft Purview that allows administrators to permanently delete (purge) malicious emails, such as phishing attempts or malware, directly from user mailboxes across the organization.
How long does it take for compliance role changes to apply in Microsoft 365?
After assigning a new RBAC role, such as eDiscovery Manager or Search And Purge, it typically takes between 15 minutes to 2 hours for the permissions to fully sync across the Microsoft 365 backend and reflect in your PowerShell session.




