This PowerShell script will generate a report of the mailbox audit log entries for a specified mailbox.
Results are output to CSV/HTML, and also optionally to email.
- -Mailbox, The mailbox that you want to query for mailbox audit log entries.
- -Hours, How many hours in the past you want to query for. Default is 24 hours.
- -SendEmail, Send the HTML report and CSV attachment via email.
- -MailFrom, The "From" address for the report email.
- -MailTo, The recipient of the report email.
- -MailServer, The SMTP server to use to send the report email.
.\Get-MailboxAuditLoggingReport.ps1 -Mailbox Payroll -Hours 48
Checks the Payroll mailbox for mailbox audit log entries from the last 48 hours.
.\Get-MailboxAuditLoggingReport.ps1 -Mailbox Payroll -hours 48 -SendEmail -MailFrom [email protected] -MailTo [email protected] -MailServer smtp.exchangeserverpro.net
Checks the Payroll mailbox for mailbox audit log entries from the last 48 hours and sends the report email with the CSV file attached.
Written by: Paul Cunningham
Find me on:
- My Blog: https://paulcunningham.me
- Twitter: https://twitter.com/paulcunningham
- LinkedIn: https://au.linkedin.com/in/cunninghamp/
- Github: https://github.com/cunninghamp
Check out my books and courses to learn more about Office 365 and Exchange Server.