get-mailbox | get-mailboxstatistics | select displayname, totalItemSize | export-csv "CSV File"
This works all-and-good until they want additional information, like department, or office! Since this additional information is not stored in the mailbox object, but the user object, you need to meld a get-user with your get-mailboxstatistics. This can easily turn your quick little process into a massive, eight hour query pulling data.
This script:
- Specify an OU or Distribution Group, and it will read all the members.
- Read mailbox name, total item size, Office, current size, if using db quotas, issue warning quota, prohibit send quota, when the mailbox was created, last logon and database currently resides on.
- Output to CSV report.
- Attach it to an email to multiple recipients.
- In email message body, break down the current db limits applied to all dbs in the report. "If UseDatabaseDefaults = True, see the message body for that size limit"