Skip to main content

Purview

PowerShell for Microsoft Purview, using the ExchangeOnlineManagement module's Security & Compliance connection (see Microsoft 365 — Overview & Connection).

Scripts​

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.