skip to Main Content

Exchange Server health check with PowerShell script

Incidents and problems are surfacing about Exchange Server, and you like to check the Exchange Server health. What is the best way to check the health? Perhaps you want to add a new Exchange Server to the environment, and before doing that, you want to check the health. Let’s see how to health check Exchange Server with an excellent PowerShell script.

Why you want to check Exchange Server health

It’s good to check the Exchange Server health if there are incidents, problems, or changes that you have to apply:

  • There is a problem with the Exchange Server
  • Before upgrading Exchange Server CU to the latest version
  • Before you install the hybrid configuration wizard for Office 365 migrations
  • Before you create a DAG between Exchange Servers
  • Introducing a new Exchange Server in the organization

Exchange Server health check PowerShell script

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.

Why I recommend using this PowerShell script:

  • Supports Exchange Server 2013/2016/2019
  • A changelog kept with all the fixes/features
  • It’s created and maintained by Microsoft Engineers
  • Always looking for improvements
  • Open to suggestions and features
  • It’s 100% PowerShell

Good to know is that it might work on Exchange Server 2007/2010, but it’s not supported.

Download and prepare the Exchange Health check script

Download Exchange health checker PowerShell script from the official page (GitHub). At the moment of writing, I will test Exchange Server Performance Health Checker Script version 3.1.1.

The chance is big that if you read this article, the version is changed. That’s because the team releases a couple of updates every single month, which is very great! If you do have any bugs, feature suggestions, or feedback, you can email them at extoolsfeedback@microsoft.com.

Download Exchange health checker PowerShell script from GitHub

Place the HealthChecker.ps1 PowerShell script on the Exchange Server C:\scripts folder. If you don’t have a scripts folder, create one. Make sure to check if the file is unblocked to prevent any errors when running the script. Read more in the article Not digitally signed error when running PowerShell script.

Verify the hash before running the script. You can find the hash at the top of each version release.

Run the Exchange Server Health Checker PowerShell script

Run Exchange Management Shell as administrator on the Exchange Server. Run HealthChecker.ps1 script and specify the Exchange Server. If you don’t identify the Exchange Server, it will check the localhost (the one you are on right now).

The Exchange HealthChecker.ps1 script will generate two files. These files are generated in the same directory of the script. In this example, it’s the folder C:\scripts.

  • 1x TXT file: The txt file is the same as the output in PowerShell. But it’s handy if you want to attach it to an email or place it in a folder.
  • 1x XML file: To better view the XML file, you must run another command to generate a report. See below.

Exchange Server health check files

Generate Exchange health report

A new EX01-2016Report.html is created in the scripts folder.

Exchange Server health check report in HTML file

Open the Exchange health report EX01-2016Report.

You will see the colors:

  • Grey: 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

The most important ones that you need to take care of are the red ones. Go through it carefully.

Note that most of these recommendations only apply to Exchange 2013/2016/2019. The script will run against Exchange 2010/2007, but the output is more limited.

Exchange health check report

Do you have more than one Exchange Server running? You want to have a report of these Exchange Servers. Let’s have a look at that in the next step.

Generate Exchange health report for multiple Exchange Servers

Get the health report of another Exchange Server. In my example, Exchange Server EX02-2016.

The script created two files in the scripts folder.

Generate the Exchange health report. This time, only use the -BuildHtmlServersReport parameter. It will gather all the XML files in the C:\scripts folder and generate an Exchange health report.

A new ExchangeAllServersReport.html file is created in the scripts folder.

Exchange Server all servers health report

Open the Exchange Server health report ExchangeAllServersReport.

Exchange health check report

If everything shows green, you are all set. If it’s yellow, look into it. Do you see red items in the Exchange health report? We recommend you to fix it.

Read more: Check Exchange health mailboxes »

Conclusion

In this article, you learned how to check Exchange Server health with the PowerShell HealthChecker.ps1 script. A couple of scripts on the internet will do an Exchange Server health check, but the authors do not keep the script up to date as this one.

In the technology world, you have to provide new features, bug fixes, and adjustments to enjoy the software’s full potential. That’s why I recommend using only this script for an Exchange health check. It’s an excellent PowerShell script that you must have in your collection.

Did you enjoy this article? You may also like Take Exchange Server out of maintenance mode. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 0 Comments

Leave a Reply

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

Back To Top