PowerShell script to generate a report of mailboxes, including information such as item count, total size, and other useful attributes.
Get-MailboxReport.ps1 - Mailbox report generation script.
Generates a report of useful information for the specified server, database, mailbox or list of mailboxes. Use only one parameter at a time depending on the scope of your mailbox report.
Single mailbox reports are output to the console, while all other reports are output to a CSV file.
-All Generates a report for all mailboxes in the organization.
-Server Generates a report for all mailboxes on the specified server.
-Database Generates a report for all mailboxes on the specified database.
-File Generates a report for mailbox names listed in the specified text file.
-Mailbox Generates a report only for the specified mailbox.
-Filename (Optional) Specifies the CSV file name to be used for the report. If no file name specificed then a unique file name is generated by the script.
-SendEmail Specifies that an email report with the CSV file attached should be sent.
-MailFrom The SMTP address to send the email from.
-MailTo The SMTP address to send the email to.
-MailServer The SMTP server to send the email through.
.\Get-MailboxReport.ps1 -Database DB01
Returns a report with the mailbox statistics for all mailbox users in database DB01
Returns a report with the mailbox statistics for all mailbox users and send an email report to the specified recipient.
A detailed explanation of this script and a demonstration video are available at: http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010
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
Chris Brown, http://www.flamingkeys.com
Boe Prox, http://learn-powershell.net/
- V1.00, 2/2/2012 - Initial version
- V1.01, 27/2/2012 - Improved recipient scope settings, exception handling, and custom file name parameter.
- V1.02, 16/10/2012 - Reordered report fields, added OU, primary SMTP, some specific folder stats, archive mailbox info, and updated to show DAG name for databases when applicable.
- V1.03, 27/05/2014 - Modified behavior of Server parameter. Added UseDatabaseQuotaDefaults, AuditEnabled, HiddenFromAddressListsEnabled, IssueWarningQuota, ProhibitSendQuota, ProhibitSendReceiveQuota. Added email functionality. Added auto-loading of snapin for simpler command lines in Task Scheduler