Exchange database health report is a great way to get notified by email when the health of your Exchange DAG databases is affected. The script will send an email notification indicating dismounted databases, and displaced ones according to the activation preference.
Exchange database health report
If you are administering Microdot Exchange environment, the first and most important thing you want to know about is the health of your Exchange databases. This might seems a natural thing to say, but the exchange database health is a very wide concept.
You might have many monitoring tools in place, like Microsoft system center operations manager, to give you indication of your overall Exchange environment health. There is nothing wrong or bad about that, but from by practical experience, using such tools is great for my data center operations team, since they will get extensive alerts and health indication about each and every component in my Exchange environment.
For me, I finish my work and leave home or for a vacation. I want a simple and easy way for notify only if the following conditions are met:
- If any database is dismounted
- If any database got switched over another server [database is not mounted on the optimal server based on the activation preference set]
Anything else, can be managed by my data center operations team or something. I started to work on the Exchange database health report script, that will alert me via email, if any of those conditions are met. I do not want any details log on the notification email. Only the fact that one of the above conditions is met. You have to schedule the Exchange database health report script to run every half an hour or so to get the expected outcome.
The new version of the Exchange database health report script contains a lot of enhancements like:
- Exchange 2013 support and above.
- 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, and you can provide a list of DAG names.
Run the script from PowerShell without SMTP email notification
.\Get-DBCopyHealth.ps1 -HTMLReport myfile.html
Run the script from PowerShell and filter for databases on DAG1 and DAG2
.\Get-DBCopyHealth.ps1 -HTMLReport myfile.html -InputDAGs DAG1,DAG2
Run the script from PowerShell with verbose logging and without SMTP email notification
.\Get-DBCopyHealth.ps1 -HTMLReport myfile.html -verbose
Run the script from PowerShell without SMTP email notification. We do not want to check mounting status, only optimal DB placement
.\Get-DBCopyHealth.ps1 -HTMLReport myfile.html -DontCheckMountStatus
Run the script with Email report option
.\Get-DBCopyHealth.ps1 -HTMLReport myfile.html -SendMail $true -MailFrom firstname.lastname@example.org -MailServer smtp.contoso.com -MailTo email@example.com
Download Version 3 here
Click here to get the Get-DBCopyHealth version 3 script from Microsoft TechNet Gallery.