Aug 10 2017 05:30 PM
have 2000 users
1500 are audit enabled in office 365
500 to be enabled
how to do this by powershell?
Thanks
Aug 10 2017 09:44 PM
SolutionAlready 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
Aug 11 2017 10:19 PM
this is the script that we use to enable audit, is there a way we can just target enabling disabled users without going through all users (including enabled users)?
Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "UserMailbox"} | Set-Mailbox -AuditEnabled $true
Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "UserMailbox"} | Set-Mailbox -AuditOwner MailboxLogin,HardDelete,SoftDelete,Create,Move,MoveToDeletedItems,Update
Aug 12 2017 06:00 AM
Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited | ? {$_.AuditEnabled -eq $False} | Set-Mailbox -AuditEnabled $True -AuditOwner MailboxLogin,HardDelete,SoftDelete,Create,Move,MoveToDeletedItems,Update
Aug 13 2017 11:53 PM - edited Jul 07 2018 11:42 AM
You can use the below Command :
TO enable auditing for a single mailbox (in this example, belonging to Steve Smith), you can use this PowerShell command:
Set-Mailbox -Identity "Steve Smith" -AuditEnabled $true.
To enable auditing for all Office 365 mailboxes in your organization, you can use this PowerShell command:
Get-Mailbox -ResultSize Unlimited -Filter{RecipientTypeDetails -eq "UserMailbox"} | Set-Mailbox -AuditEnabled$true.
Jun 14 2018 06:17 PM
when we tried to enable it failed with time out . do you have any script to apply retry when we run audit
Jun 15 2018 03:07 AM
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
Aug 10 2017 09:44 PM
SolutionAlready 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