Commands › Exchange Online
Search-MailboxAuditLog
> [!NOTE] > This cmdlet will be deprecated in the cloud-based service. To access audit log data, use the Search-UnifiedAuditLog cmdlet. For more information, see this blog post: <https://aka.ms/AuditCmdletBlog>. Use the Search-MailboxAuditLog cmdlet to search mailbox audit log entries matching the specified search terms.
Quick start script
# Search-MailboxAuditLog — 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
Search-MailboxAuditLog | Format-List
# 3. Export for evidence / drift tracking
Search-MailboxAuditLog | Export-Clixml .\MailboxAuditLog-$(Get-Date -Format yyyyMMdd).xml
Syntax — 2 parameter sets
Identity
Search-MailboxAuditLog [[-Identity] <MailboxIdParameter>]
[-ShowDetails]
[-DomainController <Fqdn>]
[-EndDate <ExDateTime>]
[-ExternalAccess <Boolean>]
[-GroupMailbox]
[-HasAttachments <Boolean>]
[-IncludeInactiveMailbox]
[-LogonTypes <MultiValuedProperty>]
[-Operations <MultiValuedProperty>]
[-ResultSize <Int32>]
[-StartDate <ExDateTime>]
[<CommonParameters>]
MultipleMailboxesSearch
Search-MailboxAuditLog [-Mailboxes <MultiValuedProperty>]
[-DomainController <Fqdn>]
[-EndDate <ExDateTime>]
[-ExternalAccess <Boolean>]
[-GroupMailbox]
[-HasAttachments <Boolean>]
[-IncludeInactiveMailbox]
[-LogonTypes <MultiValuedProperty>]
[-Operations <MultiValuedProperty>]
[-ResultSize <Int32>]
[-StartDate <ExDateTime>]
[<CommonParameters>]
Parameters (13)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.