Reporting on mailbox database size

In Exchange 2007, it was actually quite difficult to determine the size of a mailbox database using PowerShell. The Get-MailboxDatabase cmdlet did not return the size of the database, and instead, you had to use the cmdlet to determine the path to the EDB file and calculate the file size using the Get-Item cmdlet or WMI. In Exchange 2010, determining this is very simple and the information can easily be retrieved using the Get-MailboxDatabase cmdet. In this recipe, we will take a look at how to report on mailbox database size using the Exchange Management Shell.

How to do it...

To retrieve the total size for each mailbox database, use the following command:

Get-MailboxDatabase -Status | select-object Name,DatabaseSize ...

Get Microsoft Exchange 2010 PowerShell Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.