Commands › Exchange Online
Export-ActivityExplorerData
For more information, see Security & Compliance PowerShell. Use the Export-ActivityExplorerData cmdlet to export activities from Data classification \> Activity Explorer in the Microsoft 365 Purview compliance portal. Activity explorer reports on up to 30 days worth of data.
Quick start script
# Export-ActivityExplorerData — 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
Export-ActivityExplorerData -EndTime <DateTime> -OutputFormat <String> -StartTime <DateTime> | Format-List
# 3. Export for evidence / drift tracking
Export-ActivityExplorerData | Export-Clixml .\ActivityExplorerData-$(Get-Date -Format yyyyMMdd).xml
Syntax
Export-ActivityExplorerData -EndTime <DateTime> -OutputFormat <String> -StartTime <DateTime>
[-Filter1 <String[]>]
[-Filter2 <String[]>]
[-Filter3 <String[]>]
[-Filter4 <String[]>]
[-Filter5 <String[]>]
[-PageCookie <String>]
[-PageSize <Int32>]
[<CommonParameters>]
Parameters (10)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.