Commands › Exchange Online
Get-AuditLogSearch
Return a list of current audit log searches that were created with the New-AdminAuditLogSearch or New-MailboxAuditLogSearch cmdlets. The Get-AuditLogSearch cmdlet also returns audit log searches that are initiated whenever an administrator uses the Exchange admin center (EAC) to export audit logs.
Quick start script
# Get-AuditLogSearch — 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-AuditLogSearch | Format-List
# 3. Export for evidence / drift tracking
Get-AuditLogSearch | Export-Clixml .\AuditLogSearch-$(Get-Date -Format yyyyMMdd).xml
Syntax
Get-AuditLogSearch [[-Identity] <AuditLogSearchIdParameter>]
[-CreatedAfter <ExDateTime>]
[-CreatedBefore <ExDateTime>]
[-ResultSize <Int32>]
[-Type <String>]
[<CommonParameters>]
Parameters (5)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.