Commands › Exchange Online

Get-ComplianceRetentionEvent

Exchange Online ExchangeOnlineManagement Get-*

For more information, see Security & Compliance PowerShell. Use the Get-ComplianceRetentionEvent cmdlet to view compliance retention events in the Microsoft Purview compliance portal.

Quick start script

# Get-ComplianceRetentionEvent — 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-ComplianceRetentionEvent | Format-List

# 3. Export for evidence / drift tracking
Get-ComplianceRetentionEvent | Export-Clixml .\ComplianceRetentionEvent-$(Get-Date -Format yyyyMMdd).xml

Syntax

Get-ComplianceRetentionEvent [-Identity <PolicyIdParameter>]
 [-BeginDateTime <System.DateTime>]
 [-DomainController <Fqdn>]
 [-EndDateTime <System.DateTime>]
 [-PreviewOnly]
 [<CommonParameters>]

Parameters (5)

ParameterTypeRequiredWhat it controls
-Identity PolicyIdParameter The Identity parameter specifies the compliance retention event that you want to view. You can use any value that uniquely identifies the event. For example:
-BeginDateTime DateTime {{ Fill BeginDateTime Description }}
-DomainController Fqdn This parameter is reserved for internal Microsoft use.
-EndDateTime DateTime {{ Fill EndDateTime Description }}
-PreviewOnly SwitchParameter {{ Fill PreviewOnly Description }}

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.