What is the best way to get information about the mailbox database size? 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.
Table of contents
- What is the available new mailbox (white) space?
- Example of mailbox database size and available new mailbox (white) space
- Get mailbox database size and available new mailbox space
- Sort mailbox database size on available new mailbox space
- Clear available white space in the mailbox database
- Conclusion
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 available new mailbox space available.
The database size is the size that is using the disk volume. If you have a 100GB mailbox database size, that means 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 we 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).
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, in which 80 GB is in use by the mailboxes, and 10 GB is the available mailbox 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.
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)
Copy
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)
Copy
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
Copy
Clear available white space in the mailbox database
Read more on how to Clear white space in Exchange database.
Conclusion
In this article, 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. I hope that this article was informative to you.