Reporting on mailbox database size
In this recipe, we are going to take a look at how we can verify the size of the mailbox databases. This is fairly simple and the information can easily be retrieved using the Get-MailboxDatabase
cmdlet. In this recipe, we will take a look at how to report on mailbox database size using the Exchange Management Shell for Exchange 2016.
How to do it...
To retrieve the total size for each mailbox database, use the following command:
Get-MailboxDatabase -Status | select-object Name,DatabaseSize
The output from this command might look something like this:

How it works...
When running the Get-MailboxDatabase
cmdlet, we can use the -Status
switch parameter to receive additional information about the database, such as the mount status, the backup status, and the total size of the database, as shown in the previous example. To generate a report with this information, simply pipe the command to the Export-CSV
cmdlet and specify the path and filename, as shown:
Get-MailboxDatabase...