Skip to content

Instantly share code, notes, and snippets.

@AshFlaw
Created July 19, 2018 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AshFlaw/2c731d943b7f6ff1b7b13e0c898f08ca to your computer and use it in GitHub Desktop.
Save AshFlaw/2c731d943b7f6ff1b7b13e0c898f08ca to your computer and use it in GitHub Desktop.
Check, enable and disable Tenant level mailbox auditing in Exchange Online
# Get Auditing Status
Get-OrganizationConfig | Select AuditDisabled
# Disable Auditing for Tenant
Set-OrganizationConfig -AuditDisabled $True
# Disable Auditing for User
Set-MailboxAuditBypassAssociation -Identity $User -AuditBypassEnabled $True
# Find Mailboxes with Audting Disabled
Get-MailboxAuditBypassAssociation | ? {$_.AuditBypassEnabled -eq $True} | Format-Table Name, WhenCreated, AuditBypassEnabled
# Disable Audting bypass for a single mailbox
Set-MailboxAuditBypassAssociation -Identity $User -AuditBypassEnabled $False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment