Commands › Exchange Online

Stop-ComplianceSearch

Exchange Online ExchangeOnlineManagement Stop-*

Stop running compliance searches in Exchange Server 2016 or later and in the Microsoft Purview compliance portal.

Quick start script

# Stop-ComplianceSearch — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Stop-ComplianceSearch -Identity <ComplianceSearchIdParameter> | Format-List

# 3. Export for evidence / drift tracking
Stop-ComplianceSearch | Export-Clixml .\ComplianceSearch-$(Get-Date -Format yyyyMMdd).xml

Syntax

Stop-ComplianceSearch [-Identity] <ComplianceSearchIdParameter>
 [-Confirm]
 [-WhatIf]
 [<CommonParameters>]

Parameters (3)

ParameterTypeRequiredWhat it controls
-Identity ComplianceSearchIdParameter yes The Identity parameter specifies the compliance search that you want to stop.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-WhatIf SwitchParameter The WhatIf switch doesn't work in Security & Compliance PowerShell.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.