A very simple script to enable Mailbox auditing on all mailboxes within your O365 tenancy, that currently do not have mailbox auditing enabled.  The script will firstly check all mailboxes that do not have mailbox auditing enabled, and then enable auditing on those mailboxes that are missing the mailbox auditing.

To run the script, simply run the script within a PowerShell window connected to your O365 tenancy.  No parameters are required - the script will enable mailbox auditing by default.  The script will also log out to the PowerShell window and to a text file so that you can go through the log for any errors.

I hope you find the script useful!