Commands › Exchange Online

Get-DlpCompliancePolicy

Exchange Online ExchangeOnlineManagement Get-*

For more information, see Security & Compliance PowerShell. Use the Get-DlpCompliancePolicy to view data loss prevention (DLP) policies in the Microsoft Purview compliance portal.

Quick start script

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

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

Syntax

Get-DlpCompliancePolicy [[-Identity] <PolicyIdParameter>]
 [-DisplayName <String>]
 [-DistributionDetail]
 [-ForceValidate <Boolean>]
 [-IncludeExtendedProperties <Boolean>]
 [-IncludeRulesMetadata <Boolean>]
 [-IncludeSimulationResults <Boolean>]
 [-IRMUserRiskConfiguredAnyRule]
 [-Summary]
 [<CommonParameters>]

Parameters (9)

ParameterTypeRequiredWhat it controls
-Identity PolicyIdParameter The Identity parameter specifies the DLP policy that you want to view. You can use any value that uniquely identifies the policy. For example:
-DisplayName String {{ Fill DisplayName Description }}
-DistributionDetail SwitchParameter The DistributionDetail switch returns detailed policy distribution information in the DistributionResults property. You don't need to specify a value with this switch.
-ForceValidate Boolean {{ Fill ForceValidate Description }}
-IncludeExtendedProperties Boolean {{ Fill IncludeExtendedProperties Description }}
-IncludeRulesMetadata Boolean {{ Fill IncludeRulesMetadata Description }}
-IRMUserRiskConfiguredAnyRule SwitchParameter {{ Fill IRMUserRiskConfiguredAnyRule Description }}
-IncludeSimulationResults Boolean {{ Fill IncludeSimulationResults Description }}
-Summary SwitchParameter {{ Fill Summary Description }}

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