Commands › Exchange Online
New-AdminAuditLogSearch
> [!NOTE] > This cmdlet has been 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/AdminAuditCmdletBlog>. Use the New-AdminAuditLogSearch cmdlet to search the contents of the administrator audit log and send the results to one or more mailboxes that you specify.
Quick start script
# New-AdminAuditLogSearch — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org
# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-AdminAuditLogSearch
$before | Format-List
# 3. Make the change (dry run first)
New-AdminAuditLogSearch -EndDate <ExDateTime> -StartDate <ExDateTime> -StatusMailRecipients <MultiValuedProperty> -WhatIf
New-AdminAuditLogSearch -EndDate <ExDateTime> -StartDate <ExDateTime> -StatusMailRecipients <MultiValuedProperty>
# 4. Verify and diff
$after = Get-AdminAuditLogSearch
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
New-AdminAuditLogSearch -EndDate <ExDateTime> -StartDate <ExDateTime> -StatusMailRecipients <MultiValuedProperty>
[-Cmdlets <MultiValuedProperty>]
[-Confirm]
[-DomainController <Fqdn>]
[-ExternalAccess <Boolean>]
[-Name <String>]
[-ObjectIds <MultiValuedProperty>]
[-Parameters <MultiValuedProperty>]
[-UserIds <MultiValuedProperty>]
[-WhatIf]
[<CommonParameters>]
Parameters (12)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.