Purview
PowerShell for Microsoft Purview, using the ExchangeOnlineManagement module's
Security & Compliance connection (see
Microsoft 365 — Overview & Connection).
Scripts
- Unified Audit Log Export — what actually happened, exported without silent truncation.
- Retention Policy Inventory — what is being kept, for how long, where, and what happens at the end.
- DLP Policy Coverage — which policies are enforcing, which are still in test mode, and which locations are uncovered.
- Sensitivity Label Publication — which labels exist, which are published to whom, and which nobody can apply.
The connection is different here
Three of these need Connect-IPPSSession rather than Connect-ExchangeOnline.
They are separate endpoints in the same module and the cmdlets do not overlap:
Connect-IPPSSession -UserPrincipalName [email protected]
The audit log export is the exception — Search-UnifiedAuditLog lives on the
Exchange Online connection. Running the wrong one produces "the term
Get-RetentionCompliancePolicy is not recognized", which reads like a module
problem and isn't.
Tip — Policy and rule are two objects here too
Retention, DLP and label policies all split configuration from scope the same way Defender's do: a policy holds the settings and a rule holds the conditions. Reading only the policy tells you half of what is in force, which is why each script joins both.