Commands › Exchange Online

Get-ComplianceSearch

Exchange Online ExchangeOnlineManagement Get-*

View estimate compliance searches in Exchange Server 2016 or later and in the Microsoft Purview compliance portal. After you use the New-ComplianceSearchAction cmdlet to define a preview action for the compliance search, use the Get-ComplianceSearchAction cmdlet to view the results of the compliance search.

Quick start script

# Get-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
Get-ComplianceSearch | Format-List

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

Syntax

Get-ComplianceSearch [[-Identity] <ComplianceSearchIdParameter>]
 [-Case <String>]
 [-DomainController <Fqdn>]
 [-ResultSize <Unlimited>]
 [<CommonParameters>]

Parameters (4)

ParameterTypeRequiredWhat it controls
-Identity ComplianceSearchIdParameter The Identity parameter specifies the compliance search that you want to view.
-Case String This parameter is available only in the cloud-based service.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-ResultSize Unlimited The ResultSize parameter specifies the maximum number of results to return. If you want to return all requests that match the query, use unlimited for the value of this parameter. The default value is 1000.

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