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

Your email address will not be published. Required fields are marked *

Latest Posts

  • Hello world!

    Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

  • Windows Server 2019 activation

    Steps: KMS activation keyshttps://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys

  • ExchangeOnlineManagement 3.1.0

    The Exchange Online Powershell V1 module is now deprecated. We need to use the Exchange OnlinePowershell V3 module instead. Command to install Modulehttps://www.powershellgallery.com/packages/ExchangeOnlineManagement/3.1.0 Install-Module -Name ExchangeOnlineManagement…