The Exchange Health Checker Script

At the end of last year, Microsoft (along with other GitHub’rs) came up with a script that will check the general health and configuration of Exchange. The Exchange Server Health Checker script helps detect common configuration issues known to cause performance issues and other long-running issues caused by a simple configuration change within an Exchange Environment. It also helps collect useful information about your server to help speed up common information-gathering of your server.

It is a simple and powerful tool to use when you have the following scenarios:

  • There is a problem with your Exchange Server
  • You are upgrading Exchange Server CU to the latest version
  • You are installing the hybrid configuration wizard for Office 365 migrations
  • You are creating a DAG between Exchange Servers
  • You are introducing a new Exchange Server in the organization – during post configuration

Downloading the Script

You can get the script here: Exchange Health Checker Script
Also, you can check out some of the features from this article: Exchange Health Checker has a new home – Microsoft Tech Community


Version at the time of this article – 22.04.26.1650 (NOTE: The script will update itself when you run it if needed)



I like to save my Exchange scripts in the $exscripts folder (C:\Program Files\Microsoft\Exchange Server\v15\scripts). In Exchange PowerShell, you can access this folder quickly by typing:

Running the Script

There are a number of ways to generate the report when running the script. My suggestion would be to put a PowerShell Menu that would run the different report outputs for whatever you need. HEY, I MIGHT WRITE THAT SCRIPT TO DO THAT!!!!

Standard Way – Run in PowerShell on the Exchange Server you are on

From the folder you downloaded the file to, run:

You will get a PowerShell Output similar to this:

HealthChecker.ps1

You will want to look for Yellow and Red text showing you possible issues. Green is good! Also, at the end of the Output, you will see where the xml and txt files of the results have been saved:

HealthChecker.ps1

The PowerShell output is good for just a quick checkup and view of the server in question. But, sometimes you need a nice report to show the stakeholders for the project or you boss. This script can do that!

Building an HTML Report from the Script

Run the Health Checker Script with the -BuildHtmlServerReport parameter and use the -HtmlReportFile parameter to choose the path where the file will be saved:

Your Output will be in an easily readable format that can be used in a number of different ways for viewing:

HTML Report

It uses the txt and xml files that were saved when the script was run to build the HTML file. AND, as you can see, it is much easier to read the data extracted from the script. Everything is color coded as well for ease of use:

  • Grey/White: Informational items
  • Green: Settings found to match the recommendations
  • Yellow: Settings that give a warning which you can look at
  • Red: Settings that can cause performance problems

Okay that is great! But I have 20 Exchange Servers in my Farm! How do I script that so that it is in ONE report and not 20! I have a spouse and kids dang it!

If you know my blog, you know that I’ve been in Exchange environments that run 40+ servers in their farm! No worries, here is the syntax to have the script compile data for all the Exchange servers in your org with just ONE LINE of code:

NOTE: This syntax will run the script in PowerShell for each server, save the txt and xml files for each server, and then build the HTML report from those files. All those file will be in the directory where the script resides. In my case it is the $exscripts folder. Now you can use the -htmlreportfile parameter and save it somewhere else, then execute the report from that directory using the Set-Location parameter.

Conclusion

The Exchange Health Checker Script is one that can help you figure out the configuration of the server quickly and easily, especially when you’re in a pinch. I have been using it on all of my projects and I suggest you do as well! If you have any better scripting examples for the one liner or want to help me write that menu version, contact me through here or on Github!

THANKS FOR READING!

CHECK OUT MY OTHER POSTS!

STAY POSITIVE AND CONTINUE LEARNING!

REFERENCES:
Exchange Server health check with PowerShell script – ALI TAJRAN
Exchange Health Checker has a new home – Microsoft Tech Community
HealthChecker – Microsoft – CSS-Exchange
Download NOW

About Lance Lingerfelt

Lance Lingerfelt Profile Photo

Lance Lingerfelt is an M365 Specialist and Evangelist with over 20 years of experience in the Information Technology field. Having worked in enterprise environments to small businesses, he is able to adapt and provide the best IT Training and Consultation possible. With a focus on AI, the M365 Stack, and Healthcare, he continues to give back to the community with training, public speaking events, and this blog.

Get E-Mail Updates
I agree to have my personal information transfered to MailChimp ( more information )
Want to know when I post new content? Sign up here to get an email when I do post!
I despise spam. Your email address will not be sold or shared with anyone else.

2 thoughts on “The Exchange Health Checker Script

  1. Hi! Does anyone know if there is a chance there will be a generic Check Script like this for general windows server?
    I think parts of the Checks apply to most Windows Server installations.

    best regards,
    David

    1. I would search around GitHub to see if there was any made scripts to do that. There are built in cmdlets in Powershell that will show what Windows Updates are installed and configured. I’m sure you could spin it into a PowerShell script that would do similar functionality as the Health Checker. Again, check the GitHub sites and see what you find.

      I personally haven’t spent the time to look for that type of script as Windows Update is pretty on track for that. Azure update services are available as well that can help update your endpoints much like WSUS.

      Good luck on your search!

Comments are closed.

css.php