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
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 topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not 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
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.
Type: | RuleIdParameter |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | Exchange Online |
-State
The State parameter filters the results by the state of the rule. Valid values are:
- Enabled
- Disabled
Type: | RuleState |
Accepted values: | Enabled, Disabled |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Exchange Online |