{"id":170446,"date":"2022-05-04T14:15:20","date_gmt":"2022-05-04T19:15:20","guid":{"rendered":"https:\/\/itblog.ldlnet.net\/?p=170446"},"modified":"2024-05-10T08:36:17","modified_gmt":"2024-05-10T13:36:17","slug":"the-exchange-health-checker-script","status":"publish","type":"post","link":"https:\/\/itblog.ldlnet.net\/index.php\/2022\/05\/04\/the-exchange-health-checker-script\/","title":{"rendered":"The Exchange Health Checker Script"},"content":{"rendered":"\n<p>At the end of last year, Microsoft (along with other GitHub&#8217;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.<\/p>\n\n\n\n<p> It is a simple and powerful tool to use when you have the following scenarios:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>There is a problem with your Exchange Server<\/li>\n\n\n\n<li>You are upgrading Exchange Server CU to the latest version<\/li>\n\n\n\n<li>You are installing the hybrid configuration wizard for Office 365 migrations<\/li>\n\n\n\n<li>You are creating a DAG between Exchange Servers<\/li>\n\n\n\n<li>You are introducing a new Exchange Server in the organization &#8211; during post configuration<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Downloading the Script<\/h2>\n\n\n\n<p>You can get the script here: <a rel=\"noreferrer noopener\" href=\"https:\/\/aka.ms\/ExchangeHealthChecker\" target=\"_blank\">Exchange Health Checker Script<\/a><br>Also, you can check out some of the features from this article: <a href=\"https:\/\/techcommunity.microsoft.com\/t5\/exchange-team-blog\/exchange-health-checker-has-a-new-home\/ba-p\/2306671\">Exchange Health Checker has a new home &#8211; Microsoft Tech Community<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p class=\"has-vivid-red-color has-text-color has-small-font-size\"><strong>Version at the time of this article &#8211; 22.04.26.1650 <em>(NOTE: The script will update itself when you run it if needed)<\/em><\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p><br>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:<\/p>\n\n\n<pre class=\"lang:PowerShell nums:False\" title=\"Access Exchange Scripts Folder Quickly\">Set-Location $exscripts<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Running the Script<\/h2>\n\n\n\n<p>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. <strong><em>HEY, I MIGHT WRITE THAT SCRIPT TO DO THAT!!!!<\/em><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Standard Way &#8211; Run in PowerShell on the Exchange Server you are on<\/h3>\n\n\n\n<p>From the folder you downloaded the file to, run:<\/p>\n\n\n<pre class=\"lang:PowerShell nums:False\" title=\"Exchange Health Checker Script\">.\\HealthChecker.ps1<\/pre>\n\n\n\n<p>You will get a PowerShell Output similar to this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"652\" src=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-1024x652.png\" alt=\"\" class=\"wp-image-170452\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-1024x652.png 1024w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-300x191.png 300w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-768x489.png 768w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-1536x978.png 1536w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image.png 1564w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">HealthChecker.ps1<\/figcaption><\/figure>\n\n\n\n<p>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 <strong>xml<\/strong> and <strong>txt<\/strong> files of the results have been saved:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"637\" src=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-1-1024x637.png\" alt=\"\" class=\"wp-image-170453\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-1-1024x637.png 1024w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-1-300x187.png 300w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-1-768x477.png 768w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-1.png 1512w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">HealthChecker.ps1<\/figcaption><\/figure>\n\n\n\n<p>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!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Building an HTML Report from the Script<\/h3>\n\n\n\n<p>Run the Health Checker Script with the <strong><em>-BuildHtmlServerReport<\/em><\/strong> parameter and use the <strong><em>-HtmlReportFile<\/em><\/strong> parameter to choose the path where the file will be saved:<\/p>\n\n\n<pre class=\"lang:PowerShell nums:False\" title=\"Exchange Health Checker Script HTML Report\">.\\HealthChecker.ps1 -BuildHtmlServersReport -HtmlReportFile \"<folder path>\\<filename>.html\"<\/pre>\n\n\n\n<p>Your Output will be in an easily readable format that can be used in a number of different ways for viewing:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"519\" src=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-2-1024x519.png\" alt=\"\" class=\"wp-image-170462\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-2-1024x519.png 1024w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-2-300x152.png 300w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-2-768x389.png 768w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-2-1536x779.png 1536w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2022\/05\/image-2.png 1878w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">HTML Report<\/figcaption><\/figure>\n\n\n\n<p>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:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Grey\/White:<\/strong>\u00a0Informational items<\/li>\n\n\n\n<li><strong>Green:<\/strong>\u00a0Settings found to match the recommendations<\/li>\n\n\n\n<li><strong>Yellow:<\/strong>\u00a0Settings that give a warning which you can look at<\/li>\n\n\n\n<li><strong>Red:<\/strong>\u00a0Settings that can cause performance problems<\/li>\n<\/ul>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color\"><strong><em>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!<\/em><\/strong> <\/p>\n\n\n\n<p>If you know my blog, you know that I&#8217;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:<\/p>\n\n\n<pre class=\"lang:PowerShell nums:False\" title=\"Exchange Health Checker Script All Servers HTML Report\">Get-ExchangeServer | ?{$_.AdminDisplayVersion -Match \"^Version 15\"} | %{.\\HealthChecker.ps1 -Server $_.Name}; .\\HealthChecker.ps1 -BuildHtmlServersReport; .\\ExchangeAllServersReport.html<\/pre>\n\n\n\n<p class=\"has-vivid-cyan-blue-color has-text-color has-small-font-size\"><em><strong>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. <\/strong><\/em><\/p>\n\n\n<pre class=\"lang:PowerShell nums:False\" title=\"Exchange Health Checker Script All Servers HTML Report\">Get-ExchangeServer | ?{$_.AdminDisplayVersion -Match \"^Version 15\"} | %{.\\HealthChecker.ps1 -Server $_.Name}; .\\HealthChecker.ps1 -BuildHtmlServersReport -HtmlReportFile \"<folder path>\\<filename>.html\" ; Set-Location \"<folder path>\" ; .\\<filename>.html<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>The Exchange Health Checker Script is one that can help you figure out the configuration of the server quickly and easily, especially when you&#8217;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!<\/p>\n\n\n\n<h1 class=\"wp-block-heading has-text-align-center\">THANKS FOR READING! <\/h1>\n\n\n\n<h1 class=\"wp-block-heading has-text-align-center\">CHECK OUT MY OTHER POSTS! <\/h1>\n\n\n\n<h1 class=\"wp-block-heading has-text-align-center\">STAY POSITIVE AND CONTINUE LEARNING!<\/h1>\n\n\n\n<p><em>REFERENCES:<br><\/em><a href=\"https:\/\/www.alitajran.com\/exchange-server-health-check-powershell-script\/\">Exchange Server health check with PowerShell script &#8211; ALI TAJRAN<\/a><br><a href=\"https:\/\/techcommunity.microsoft.com\/t5\/exchange-team-blog\/exchange-health-checker-has-a-new-home\/ba-p\/2306671\">Exchange Health Checker has a new home &#8211; Microsoft Tech Community<\/a><br><a href=\"https:\/\/microsoft.github.io\/CSS-Exchange\/Diagnostics\/HealthChecker\/\">HealthChecker &#8211; Microsoft &#8211; CSS-Exchange<\/a><br><a href=\"https:\/\/github.com\/microsoft\/CSS-Exchange\/releases\/latest\/download\/HealthChecker.ps1\">Download NOW<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">About Lance Lingerfelt<\/h2>\n\n\n\n<div class=\"wp-block-media-text is-stacked-on-mobile\" style=\"grid-template-columns:22% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"468\" height=\"412\" src=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2024\/03\/ProfLDL1.jpg\" alt=\"Lance Lingerfelt Profile Photo\" class=\"wp-image-196223 size-full\"\/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-small-font-size\">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.<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>At the end of last year, Microsoft (along with other GitHub&#8217;rs) came up with a script that will check the general health<\/p>\n<p class=\"link-more\"><a class=\"myButt \" href=\"https:\/\/itblog.ldlnet.net\/index.php\/2022\/05\/04\/the-exchange-health-checker-script\/\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":939,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2,3],"tags":[9,150,149,151,232,147,148,8,13],"class_list":["post-170446","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-exchange","category-general","category-powershell","tag-exchange","tag-exchange-2013","tag-exchange-2016","tag-exchange-2019","tag-exchange-deployment","tag-exchange-setup","tag-exchange-upgrade","tag-powershell","tag-script","odd"],"_links":{"self":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/170446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/comments?post=170446"}],"version-history":[{"count":24,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/170446\/revisions"}],"predecessor-version":[{"id":196306,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/170446\/revisions\/196306"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/media\/939"}],"wp:attachment":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/media?parent=170446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/categories?post=170446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/tags?post=170446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}