This example enables mailbox audit logging for Ben Smith’s mailbox.
Set-Mailbox -Identity “Ben Smith” -AuditEnabled $true
This example enables mailbox audit logging for all user mailboxes in your organization.
Get-Mailbox -ResultSize Unlimited -Filter “RecipientTypeDetails -eq ‘UserMailbox’” | Select PrimarySmtpAddress | ForEach {Set-Mailbox -Identity $_.PrimarySmtpAddress -AuditEnabled $true}
This example disables mailbox audit logging for Ben Smith’s mailbox.
Set-Mailbox -Identity “Ben Smith” -AuditEnabled $false
This example retrieves Ben Smith’s mailbox settings and pipes the specified audit settings, including the audit log age limit, to the Format-List cmdlet.
Get-Mailbox “Ben Smith” | Format-List Audit*
A value of True for the AuditEnabled property verifies that audit logging is enabled.
This example retrieves the auditing settings for all user mailboxes in your organization..
Get-Mailbox -ResultSize Unlimited -Filter “RecipientTypeDetails -eq ‘UserMailbox’” | Format-List Name,Audit*
Leave a Reply