Commands › Exchange Online
Get-DlpComplianceRule
For more information, see Security & Compliance PowerShell. Use the Get-DlpComplianceRule to view data loss prevention (DLP) rules in the Microsoft Purview compliance portal. DLP rules identify and protect sensitive information.
Quick start script
# Get-DlpComplianceRule — 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-DlpComplianceRule | Format-List
# 3. Export for evidence / drift tracking
Get-DlpComplianceRule | Export-Clixml .\DlpComplianceRule-$(Get-Date -Format yyyyMMdd).xml
Syntax
Get-DlpComplianceRule [[-Identity] <ComplianceRuleIdParameter>]
[-DisplayName <String>]
[-IncludeExecutionRuleGuids <Boolean>]
[-Policy <PolicyIdParameter>]
[<CommonParameters>]
Parameters (4)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.