Commands › Exchange Online
Get-AtpPolicyForO365
View the settings for the following features in Microsoft Defender for Office 365: - Safe Links protection for supported Office 365 apps. - Safe Documents: Uses Microsoft Defender for Endpoint to scan documents and files that are opened in Protected View in Microsoft 365 apps for enterprise. - Safe Attachments for SharePoint, OneDrive, and Microsoft Teams.
Quick start script
# Get-AtpPolicyForO365 — 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-AtpPolicyForO365 | Format-List
# 3. Export for evidence / drift tracking
Get-AtpPolicyForO365 | Export-Clixml .\AtpPolicyForO365-$(Get-Date -Format yyyyMMdd).xml
Syntax
Get-AtpPolicyForO365 [[-Identity] <AtpPolicyForO365IdParameter>]
[<CommonParameters>]
Parameters (1)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.