Post navigation

Exchange Database Health Get-DBCopyHealth

This post is updated to include information about the new version of the script (Version 3) published in April 2015 and includes a filter option to filter by DAG.

Hi everyone,

I got couple of requests to enhance and add new features on my script that reports if any Exchange DB is dismounted or placed on not optimal server according to the activation preference. See my previous post http://wp.me/p1eUZH-a8

Script Features

This script will collect all your Exchange databases and will report two things:

If any database is mounted > Email notification will be sent

If any database got switched over to another server > Email notification will be sent to report that the DB is not mounted on the server with activation preference =1 (not the optimal location)

The idea behind the script is to schedule it to run every hour or so, and you will get email notification only if something bad happens.

I explained more in a previous post more about this script and functionalists, but now i have created a new version (Version 2 ) with new features:

Exchange 2013 support

Reporting the current mounting server location in addition to where the DB should be mounted

Switch Option to disable checking for mounting status if needed

Verbose logging

Performance enhancement

Option to run the script without Email notification option

Now you can filter databases with the InputDAG option, so you can provide a list of DAG names.

.EXAMPLE
Run the script from PowerSehll without SMTP email notification
.\Get-DBCopyHealth.ps1 -HTMLReport myfile.html

.EXAMPLE
Run the script from PowerShell and filter for databases on DAG1 and DAG2
.\Get-DBCopyHealth.ps1 -HTMLReport myfile.html -InputDAGs DAG1,DAG2

.EXAMPLE
Run the script from PowerShell with verbose logging and without SMTP email notification
.\Get-DBCopyHealth.ps1 -HTMLReport myfile.html -verbose

.EXAMPLE
Run the script from PowerSehll without SMTP email notification. We do not want to check mounting status, only optimal DB placement
.\Get-DBCopyHealth.ps1 -HTMLReport myfile.html -DontCheckMountStatus