Forum Discussion
Marvin Oco
Aug 10, 2017Steel Contributor
Enable Audit via powershell
have 2000 users 1500 are audit enabled in office 365 500 to be enabled how to do this by powershell? Thanks
- Aug 10, 2017
Already there are numerous PowerShell scripts are available for this need.
Check out the article below to know how to enable Mailbox auditing.
https://technet.microsoft.com/en-us/library/dn879651.aspx?f=255&MSPPError=-2147217396
Sankarasubramanian Parameswaran
Jun 14, 2018Iron Contributor
when we tried to enable it failed with time out . do you have any script to apply retry when we run audit
TonyRedmond
Jun 15, 2018MVP
How many mailboxes are you trying to process?
The initial run of the cmdlet probably updated the audit setting for quite a few mailboxes, so you can now reduce the number of mailboxes remaining to be processed. This code only processes mailboxes that still have not had their audit setting enabled.
Get-Mailbox -RecipientTypeDetails UserMailbox | ? {$_.AuditEnabled -eq $False } | Set-Mailbox -AuditEnabled $True