Get-DlpCompliancePolicy

This cmdlet is available only in Security & Compliance Center PowerShell. For more information, see Security & Compliance Center PowerShell.

Use the Get-DlpCompliancePolicy to view Data Loss Prevention (DLP) policies in the Microsoft 365 compliance center.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Syntax

Get-DlpCompliancePolicy
   [[-Identity] <PolicyIdParameter>]
   [-IncludeExtendedProperties <Boolean>]
   [-DistributionDetail]
   [<CommonParameters>]

Description

To use this cmdlet in Security & Compliance Center PowerShell, you need to be assigned permissions. For more information, see Permissions in the Microsoft 365 compliance center.

Examples

Example 1

Get-DlpCompliancePolicy

This example displays summary information for all DLP policies in the Microsoft 365 compliance center.

Example 2

Get-DlpCompliancePolicy -Identity "PII Limited" | Format-List

This example displays detailed information for the DLP policy named "PII Limited".

Example 3

Get-DlpCompliancePolicy -Identity "PII Limited" -DistributionDetail | Format-List DistributionStatus

This example displays distribution details for a DLP policy.

Example 4

$dlp = Get-DlpCompliancePolicy; ForEach ($d in $dlp){Get-DlpCompliancePolicy -DistributionDetail $d.name | Format-List Name,DistributionStatus}

This example gets all of the DLP policies in a environment and displays the distribution status for each.

Parameters

-DistributionDetail

The DistributionDetail switch returns detailed policy distribution information in the DistributionResults property. You don't need to specify a value with this switch.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-Identity

The Identity parameter specifies the DLP policy that you want to view. You can use any value that uniquely identifies the policy. For example:

  • Name
  • Distinguished name (DN)
  • GUID
  • Id
Type:PolicyIdParameter
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Security & Compliance Center
-IncludeExtendedProperties

{{ Fill IncludeExtendedProperties Description }}

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center

Inputs

Outputs