Edit

Share via


Get-DlpComplianceRule

This cmdlet is available only in Security & Compliance PowerShell. 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.

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

Syntax

Default (Default)

Get-DlpComplianceRule
    [[-Identity] <ComplianceRuleIdParameter>]
    [-DisplayName <String>]
    [-IncludeExecutionRuleGuids <Boolean>]
    [-Policy <PolicyIdParameter>]
    [<CommonParameters>]

Description

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

Examples

Example 1

Get-DlpComplianceRule

This example displays summary information for all DLP rules in the Microsoft Purview compliance portal.

Example 2

Get-DlpComplianceRule -Identity "PII SS# Custom" | Format-List

This example displays detailed information for the DLP rule named "PII SS# Custom".

Example 3

Get-DlpComplianceRule -Policy "PII Limited"

This example lists all the rules included in the DLP compliance policy named "PII Limited".

Parameters

-DisplayName

Applicable: Security & Compliance

{{ Fill DisplayName Description }}

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: Security & Compliance

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

  • Name
  • Distinguished name (DN)
  • GUID
  • Id

Parameter properties

Type:ComplianceRuleIdParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-IncludeExecutionRuleGuids

Applicable: Security & Compliance

{{ Fill IncludeExecutionRuleGuids Description }}

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Policy

Applicable: Security & Compliance

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 identifies the policy. For example

  • Name
  • Distinguished name (DN)
  • GUID
  • Id

Parameter properties

Type:PolicyIdParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.