PowerShell for Exchange: A Script that Helps Generate Mailbox Reports

PowerShell for Exchange: A Script that Helps Generate Mailbox Reports

Greetings! My name is J. Peter Bruzzese, and I’m the Exchange 2010 instructor for TrainSignal. Whenever something interesting comes out in the Exchange world we like to either report about it through the TrainSignal blog or make a new video to post on the subject. In this case I came across a great new script by Paul Cunningham (the mind behind exchangeserverpro.com) that will help Exchange admins to generate reports for their mailboxes.

If you are looking for basic information on mailbox databases and their size and such you can always use the Get-MailboxDatabase cmdlet. For more information on the cmdlet itself just open the Exchange Management Shell and type: Get-Help Get-MailboxDatabase (note: for examples just append a –Examples to the end of that command). One example of how you might use that command is to narrow down to a specific database and look for information on mailbox data within using the following:

Get-MailboxDatabase "DB1" | Get-MailboxStatistics | Sort TotalItemSize -desc | ft displayname, totalitemsize, itemcount

Note: Another way to accomplish the same thing is with the Get-Mailbox cmdlet using the following command:

Get-Mailbox -Database DB1 | Get-MailboxStatistics | ft displayname,totaldeleteditemsize,totalitemsize

Learn more about these cmdlets and their use from ExchangeServerPro.com here:

Now Paul has taken his knowledge to the next level and has put together a great script to help you generate a report that does, as he puts it, “all the heavy lifting” for Exchange admins. The script will get information about a server, a database, a mailbox or list of mailboxes and it will put the output in a .csv file for you (unless you just run the mailbox query, which will just be displayed onscreen).

Learn more about this cool script in the video below and download it from Paul’s site here:

Ready to test your skills in Powershell? See how they stack up with this assessment from Smarterer, the newest addition to the Pluralsight family. Start this Powershell test now

Comments