Outlook

Enable or disable mailbox audit logging for a mailbox

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*

← Outlook Add-In keeps disabling
Powershell to get list of AD Users and their… →

Related articles

Outlook

OST & PST

Microsoft Outlook - Difference between OST & PST Files OST stands for Offline Storage Tables . It’s an…

Read article
Need Hands-On Help

Talk to an engineer about your environment

Our team runs this kind of infrastructure every day — not just writes about it.