Monitoring the disk space
It goes without saying that having enough disk free space is crucial for Exchange to function correctly. When a disk that is hosting one or more mailbox databases runs out of space, these databases get automatically dismounted and you will not be able to mount them until there is enough disk space, which can turn out to be another problem on its own.
In this recipe, you will learn how to easily check how much free space a database has using the shell.
How to do it...
To check how much free space a database copy (active or passive) has on a particular server, use the following cmdlet:
Get-MailboxDatabaseCopyStatus "DB01\TLEX1" | Select DiskTotalSpace, DiskFreeSpace, DiskFreeSpacePercent
How it works...
In Exchange 2010 and previous versions, programmatically checking the available space on a disk holding an Exchange database is not straightforward even when using WMI. In Exchange 2013 and 2016, this is much easier. Get-MailboxDatabaseCopyStatus
provides a myriad of information...