Colour coding the mount status of an Exchange Database

Copy the following script to Powershell file on a mailbox server in your environment and then execute it as needed from the Exchange Management shell.

$MDBs = Get-MailboxDatabase -Status | Select Name,Server,Mounted
Foreach($MBX in $MDBs){

 If($MBX.Mounted -eq $false){
  
  Write-Host $MBX.Name " " $MBX.Server " " $MBX.Mounted -BackgroundColor Red
  
 }else{
  Write-Host $MBX.Name " " $MBX.Server " " $MBX.Mounted
 }
 
}

About The Author

Leave a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top