Commands › Exchange Online

Get-DlpComplianceRule

Exchange Online ExchangeOnlineManagement Get-*

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)

ParameterTypeRequiredWhat it controls
-Identity ComplianceRuleIdParameter The Identity parameter specifies the DLP rule that you want to view. You can use any value that uniquely identifies the rule. For example:
-DisplayName String {{ Fill DisplayName Description }}
-IncludeExecutionRuleGuids Boolean {{ Fill IncludeExecutionRuleGuids Description }}
-Policy PolicyIdParameter The Policy parameter specifies the DLP policy that contains the rules. Using this parameter returns all rules that are assigned to the specified policy. Valid input for this parameter is any value that uniquely...

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