Commands › Exchange Online

Check-PurviewConfig

Exchange Online ExchangeOnlineManagement Check-*

For more information, see Security & Compliance PowerShell. Use the Check-PurviewConfig cmdlet to validate and review your organization's configuration settings in Microsoft Purview.

Quick start script

# Check-PurviewConfig — 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
Check-PurviewConfig | Format-List

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

Syntax

Check-PurviewConfig
 [[-CaseHoldPolicyNameOrId] <String>]
 [[-CaseId] <String>]
 [[-Component] <PurviewConfigComponent>]
 [-Confirm]
 [[-DateTimeUTC] <String>]
 [[-DeviceName] <String>]
 [[-File] <String>]
 [[-FileAsBytes] <Byte[]>]
 [[-IncidentId] <String>]
 [[-ItemId] <String>]
 [[-MessageId] <String>]
 [[-Organization] <OrganizationIdParameter>]
 [[-PolicyName] <String>]
 [[-RecipientAddress] SmtpAddress>]
 [[-RecordId] <String>]
 [[-RuleName] <String>]
 [[-SenderAddress] <SmtpAddress>]
 [[-SharepointItemUniqueId] <String>]
 [[-SharepointSiteId] <String>]
 [[-SiteUrl] <String>]
 [[-SitIdentity] <String>]
 [[-TestCases] <String[]>]
 [[-Theme] <PurviewConfigTheme>]
 [[-UserPrincipalName] <SmtpAddress>]
 [-WhatIf]
 [[-Workload] <String>]
 [<CommonParameters>]

Parameters (26)

ParameterTypeRequiredWhat it controls
-CaseHoldPolicyNameOrId String {{ Fill CaseHoldPolicyNameOrId Description }}
-CaseId String {{ Fill CaseId Description }}
-Component PurviewConfigComponent The Component parameter specifies the component to analyze in the test case. Valid values are:
-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.
-DateTimeUTC String The DateTimeUTC specifies the date-time of the test case in Coordinated Universal Time (UTC). For example, "2025-06-05 14:30:00".
-DeviceName String {{ Fill DeviceName Description }}
-File String This parameter is reserved for internal Microsoft use.
-FileAsBytes Byte[] {{ Fill FileAsBytes Description }}
-IncidentId String The IncidentId parameter specifies the incident to analyze in the test case.
-ItemId String This parameter is reserved for internal Microsoft use.
-MessageId String This parameter is reserved for internal Microsoft use.
-Organization OrganizationIdParameter {{ Fill Organization Description }}
-PolicyName String {{ Fill PolicyName Description }}
-RecipientAddress SmtpAddress {{ Fill RecipientAddress Description }}
-RecordId String The RuleName parameter specifies the record to analyze in the test case.
-RuleName String The RuleName parameter specifies the DLP rule to analyze in the test case.
-SenderAddress SmtpAddress {{ Fill SenderAddress Description }}
-SharepointItemUniqueId String {{ Fill SharepointItemUniqueId Description }}
-SharepointSiteId String
-SitIdentity String {{ Fill SitIdentity Description }}
-SiteUrl String {{ Fill SiteUrl Description }}
-TestCases String[] The TestCases parameter specifies the name of the test case to analyze. The available test cases and their required parameters are described in the following list:
-Theme PurviewConfigTheme The Theme parameter filters specifies the them to analyze in the test case. Valid values are:
-UserPrincipalName SmtpAddress The UserPrincipalName parameter specifies the user account to analyze in the test case (for example, `sathya@contoso.onmicrosoft.com`).
-WhatIf SwitchParameter The WhatIf switch doesn't work in Security & Compliance PowerShell.
-Workload String The Workload parameter specifies the service workload. Value values are:

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