Skip to content

Get mailbox database size and white space

What is the best way to get the mailbox database size and available space? Why would you need to know the database size and white space of a database? What is the white space in a mailbox database? In this article, you will learn step-by-step how to retrieve the information. First, it’s essential to understand what the available new mailbox (white) space is.

What is the available new mailbox (white) space?

You already know what the database size is. The more mailboxes that contain email in a database, the more the database will grow. Right? Unfortunately, that is not the correct answer. The mailbox database will increase only in database size if there is no new mailbox space available.

The database size is the size that uses the disk volume. For example, If you have a 100GB mailbox database size, it will show as 100GB in size on the disk. Now, what is the available new mailbox space?

Let’s say we will remove mailboxes from the database or move mailboxes to another database; the database will NOT shrink in size. What will happen is that the available new mailbox (white) space will be available.

Example of mailbox database size and available new mailbox (white) space

Database DB01 is 90 GB in total size. Only 70 GB is in use, and 20 GB is available (white) space. We moved mailboxes to another database, and users are deleting data from their mailboxes. A total of 20 GB is free, that’s the available new mailbox (white space).

Get mailbox database size and white space

Within time mailboxes are created, or mailboxes will grow in size on database DB01. It means that the database size will get bigger. It will first use the remaining 20 GB of available new mailbox (white) space.

In our example, 10 GB is in use. The total database size remains at 90 GB, of which 80 GB is in use by the mailboxes, and 10 GB is the available mailbox space.

Get mailbox database size and white space

When there is no available white space left, it will take the available space of the volume disk D:\. The database will grow in size, and the disk space on the volume will grow together.

Get mailbox database size and white space

If we remove mailboxes or move mailboxes to another mailbox database, the white space will be available again. We will start all over again. The database will grow in size, and it will first use the available new mailbox (white) space.

Get mailbox database size and available new mailbox space

Run Exchange Management Shell as administrator. Make use of the Get-MailboxDatabase cmdlet. Run the following command.

[PS] C:\>Get-MailboxDatabase -Status | Select Name, DatabaseSize, AvailableNewMailboxSpace

Name DatabaseSize                     AvailableNewMailboxSpace
---- ------------                     ------------------------
DB01 149.4 GB (160,390,184,960 bytes) 8 GB (8,589,508,608 bytes)
DB04 280.8 GB (301,453,541,376 bytes) 5.54 GB (5,948,440,576 bytes)
DB02 443.1 GB (475,801,845,760 bytes) 4.324 GB (4,643,127,296 bytes)
DB03 499.6 GB (536,468,258,816 bytes) 107.9 GB (115,884,294,144 bytes)
DB05 407.9 GB (437,952,446,464 bytes) 2.687 GB (2,884,894,720 bytes)

Sort mailbox database size on available new mailbox space

We like to sort the output on the available white space.

[PS] C:\>Get-MailboxDatabase -Status | Select Name, DatabaseSize, AvailableNewMailboxSpace | Sort-Object -Descending AvailableNewMailboxSpace

Name DatabaseSize                     AvailableNewMailboxSpace
---- ------------                     ------------------------
DB03 499.6 GB (536,468,258,816 bytes) 107.9 GB (115,884,228,608 bytes)
DB01 149.4 GB (160,390,184,960 bytes) 8 GB (8,589,574,144 bytes)
DB04 280.8 GB (301,453,541,376 bytes) 5.54 GB (5,948,407,808 bytes)
DB02 443.1 GB (475,801,845,760 bytes) 4.324 GB (4,643,094,528 bytes)
DB05 407.9 GB (437,952,446,464 bytes) 2.687 GB (2,884,861,952 bytes)

It will look better if the statistics only show the size in GB. For example, if you want to place it in a document.

[PS] C:\>Get-MailboxDatabase -Status | Sort-Object -Descending AvailableNewMailboxSpace | Select Name,@{Name='DatabaseSize (GB)';Expression={$_.DatabaseSize.ToGb()}},@{Name='AvailableNewMailboxSpace (GB)';Expression={$_.AvailableNewMailboxSpace.ToGb()}}

Name      DatabaseSize (GB) AvailableNewMailboxSpace (GB)
----      ----------------- -----------------------------
DB03                    499                           107
DB01                    149                             7
DB02                    443                             4
DB04                    280                             4
DB05                    407                             2

Do you like to know which mailboxes are taking up the most space in the mailbox database? Read the article Get mailbox size of all users in Exchange with PowerShell.

Clear available white space in the mailbox database

Read more on how to Clear white space in Exchange database.

Conclusion

You learned how to get mailbox database size and white space with PowerShell. It’s good to know how to find the mailbox database size and the mailbox available space. A good understanding of the mailbox available white space is essential.

Did you enjoy this article? You may like Configure mailbox database storage quotas. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 4 Comments

  1. Hello Ali, first thanks for your blog and many helpful articles.
    We have a Exchange 2016 with a DB that have around 80 GB of “AvailableNewMailboxSpace”. But it seems like, it doesn’t get used by Exchange. Instead the total MDB size gets increased.
    How does the Server use that white space – Only with new mailboxes or also when existing mailboxes get bigger?

Leave a Reply

Your email address will not be published. Required fields are marked *