Mailbox database size powershell

A great topic!

To check the size of a mailbox database in PowerShell, you can use the following commands:

Method 1: Using the Get-MailboxDatabase cmdlet

Get-MailboxDatabase -Status | Select-Object Name, DatabaseSize

This command retrieves the list of mailbox databases and their sizes. The Status parameter is used to retrieve the database size.

Method 2: Using the Get-MailboxDatabaseStatistics cmdlet

Get-MailboxDatabaseStatistics | Select-Object DatabaseName, TotalDatabaseSize

This command retrieves the mailbox database statistics, including the total database size.

Method 3: Using the Get-MailboxDatabase cmdlet with the -Statistics parameter

Get-MailboxDatabase -Statistics | Select-Object Name, DatabaseSize

This command retrieves the mailbox database statistics, including the database size.

Example output:

Name                      DatabaseSize
----                      ------------
Mailbox Database 1      10 GB
Mailbox Database 2      20 GB
Mailbox Database 3      5 GB

In this example, the output shows the name of each mailbox database and its corresponding size.

Tips: