Commands › Exchange Online
Get-ATPProtectionPolicyRule
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.
Quick start script
# Get-ATPProtectionPolicyRule — 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-ATPProtectionPolicyRule | Format-List
# 3. Export for evidence / drift tracking
Get-ATPProtectionPolicyRule | Export-Clixml .\ATPProtectionPolicyRule-$(Get-Date -Format yyyyMMdd).xml
Syntax
Get-ATPProtectionPolicyRule [[-Identity] <RuleIdParameter>]
[-State <RuleState>]
[<CommonParameters>]
Parameters (2)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.