All scripts
Governance 436

Get-DefenderAntiMalwarePolicyReport

Reports anti-malware policy settings across the tenant, including which file types are blocked and whether zero hour auto purge is enabled, in one comparison table.

Get-DefenderAntiMalwarePolicyReport.ps1
<#
.SYNOPSIS
    Reports anti-malware policy configuration across the tenant.

.DESCRIPTION
    Lists every anti-malware policy with common file type filter and
    zero hour auto purge settings side by side, so configuration drift
    between policies is caught in one comparison instead of opening each
    policy individually.

.EXAMPLE
    .\Get-DefenderAntiMalwarePolicyReport.ps1

.NOTES
    Requires ExchangeOnlineManagement with an active
    Connect-ExchangeOnline session and Defender for Office 365
    permissions.

.AUTHOR
    Shehryar Hassan
#>

$policies = Get-MalwareFilterPolicy

$report = $policies | Select-Object Identity, EnableFileFilter, ZapEnabled, @{N="FileTypeCount";E={$_.FileTypes.Count}}

$report | Format-Table -AutoSize

Read it before you run it, and test in a safe tenant first.