Edit

Share via


Get-ATPProtectionPolicyRule

This cmdlet is available only in the cloud-based service.

Use the Get-ATPProtectionPolicyRule cmdlet to view rules for Microsoft Defender for Office 365 protections in preset security policies. The rules specify recipient conditions and exceptions for the protection, and also allow you to turn on and turn off the associated preset security policies.

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

Syntax

Default (Default)

Get-ATPProtectionPolicyRule
    [[-Identity] <RuleIdParameter>]
    [-State <RuleState>]
    [<CommonParameters>]

Description

For more information about preset security policies in PowerShell, see Preset security policies in Exchange Online PowerShell.

You need to be assigned permissions before you can run this cmdlet. Although this article lists all parameters for the cmdlet, you might not have access to some parameters if they aren't included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.

Examples

Example 1

Get-ATPProtectionPolicyRule | Format-Table Name,State

This example returns a summary list of the rules for Defender for Office 365 protections in preset security policies.

Example 2

Get-ATPProtectionPolicyRule -Identity "Strict Preset Security Policy"

This example returns detailed information about the rule named Strict Preset Security Policy.

Parameters

-Identity

Applicable: Exchange Online

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

  • Name
  • Distinguished name (DN)
  • GUID

By default, the available rules (if they exist) are named Standard Preset Security Policy and Strict Preset Security Policy.

Parameter properties

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

Parameter sets

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

-State

Applicable: Exchange Online

The State parameter filters the results by the state of the rule. Valid values are:

  • Enabled
  • Disabled

Parameter properties

Type:RuleState
Default value:None
Accepted values:Enabled, Disabled
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.