Exchange Server health check with PowerShell script (2024)

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.

Table of contents

  • Why you want to check Exchange Server health
  • Exchange Server health check PowerShell script
    • Download and prepare the Exchange Health check script
    • Run the Exchange Server Health Checker PowerShell script
    • Generate Exchange health report
    • Generate Exchange health report for multiple Exchange Servers
    • Generate Exchange health report for all Exchange Servers
  • Conclusion

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.

Exchange Server health check with PowerShell script (1)

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.

Exchange Server health check with PowerShell script (2)

Verify the signature before running the script with the Get-AuthenticodeSignature cmdlet.

[PS] C:\>Get-AuthenticodeSignature -FilePath "C:\Scripts\HealthChecker.ps1" | ft -AutoSize Directory: C:\ScriptsSignerCertificate Status Path----------------- ------ ----ABDCA79AF9DD48A0EA702AD45260B3C03093FB4B Valid HealthChecker.ps1

Run the Exchange Server Health Checker PowerShell script

Run Exchange Management Shell as administrator on the Exchange Server. Change directory path to C:\scripts. 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).

[PS] C:\scripts>.\HealthChecker.ps1 -Server "EX01-2016"Exchange Health Checker version 3.1.1Virtual Machine detected. Certain settings about the host hardware cannot be detected from the virtual machine. Verify on the VM Host that: - There is no more than a 1:1 Physical Core to Virtual CPU ratio (no oversubscribing) - If Hyper-Threading is enabled do NOT count Hyper-Threaded cores as physical cores - Do not oversubscribe memory or use dynamic memory allocationAlthough Exchange technically supports up to a 2:1 physical core to vCPU ratio, a 1:1 ratio is strongly recommended for performance reasons. Certain third party Hyper-Visors such as VMWare have their own guidance.VMWare recommends a 1:1 ratio. Their guidance can be found at https://www.vmware.com/files/pdf/Exchange_2013_on_VMware_Best_Practices_Guide.pdf.Related specifically to VMWare, if you notice you are experiencing packet loss on your VMXNET3 adapter, you may want to review the following article from VMWare: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2039495.For further details, please review the virtualization recommendations on Microsoft Docs at the following locations:Exchange 2013: https://learn.microsoft.com/en-us/exchange/exchange-2013-virtualization-exchange-2013-help#requirements-for-hardware-virtualization.Exchange 2016/2019: https://learn.microsoft.com/en-us/exchange/plan-and-deploy/virtualization?view=exchserver-2019.Exchange Information-------------------- Name: EX01-2016 Version: Exchange 2016 CU17 Build Number: 15.1.2044.4 Error: Out of date Cumulative Update. Please upgrade to one of the two most recently released Cumulative Updates. Currently running on a build that is 194 days old. Server Role: Mailbox MAPI/HTTP Enabled: True Exchange Server Maintenance: Server is not in Maintenance ModeOperating System Information---------------------------- Version: Microsoft Windows Server 2016 Standard Evaluation System Up Time: 2 day(s) 16 hour(s) 34 minute(s) 28 second(s) Time Zone: W. Europe Standard Time Dynamic Daylight Time Enabled: True .NET Framework: 4.8 Page File Size: Error: System is set to automatically manage the pagefile size. Power Plan: Balanced --- Error Http Proxy Setting: <None> Visual C++ 2012: Redistributable is outdated Visual C++ 2013: Redistributable is outdated Note: For more information about the latest C++ Redistributeable please visit: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads This is not a requirement to upgrade, only a notification to bring to your attention. Server Pending Reboot: FalseProcessor/Hardware Information------------------------------ Type: VMWare Processor: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz Number of Processors: 4 Note: Please make sure you are following VMware's performance recommendation to get the most out of your guest machine. VMware blog 'Does corespersocket Affect Performance?' https://blogs.vmware.com/vsphere/2013/10/does-corespersocket-affect-performance.html Number of Physical Cores: 4 Number of Logical Cores: 4 Hyper-Threading: Disabled All Processor Cores Visible: Passed Max Processor Speed: 2304 Physical Memory: 12 GBNIC Settings Per Active Adapter------------------------------- Interface Description: vmxnet3 Ethernet Adapter [Ethernet0] Driver Date: 2019-07-11 Driver Version: 1.8.16.0 MTU Size: 1500 RSS Enabled: True Link Speed: 10000 Mbps --- This may not be accurate due to virtualized hardware IPv6 Enabled: True IPv4 Address: Address: 192.168.1.52\24 Gateway: 192.168.1.1 IPv6 Address: DNS Server: 192.168.1.51 Registered In DNS: True Sleepy NIC Disabled: False --- Warning: It's recommended to disable NIC power saving options More Information: http://support.microsoft.com/kb/2740020 Packets Received Discarded: 0Frequent Configuration Issues----------------------------- TCP/IP Settings: Not Set Error: Without this value the KeepAliveTime defaults to two hours, which can cause connectivity and performance issues between network devices such as firewalls and load balancers depending on their configuration. More details: https://techcommunity.microsoft.com/t5/Exchange-Team-Blog/Checklist-for-troubleshooting-Outlook-connectivity-in-Exchange/ba-p/604792 RPC Min Connection Timeout: 0 More Information: https://blogs.technet.microsoft.com/messaging_with_communications/2012/06/06/outlook-anywhere-network-timeout-issue/ CTS Processor Affinity Percentage: 0 Credential Guard Enabled: FalseSecurity Settings----------------- LmCompatibilityLevel Settings: 3 Description: Clients use only NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication. TLS 1.0 Server Enabled: True Server Disabled By Default: False Client Enabled: True Client Disabled By Default: False TLS 1.1 Server Enabled: True Server Disabled By Default: False Client Enabled: True Client Disabled By Default: False TLS 1.2 Server Enabled: True Server Disabled By Default: False Client Enabled: True Client Disabled By Default: False Certificate: FriendlyName: Microsoft Exchange Server Auth Certificate Thumbprint: 96AC7BAD02F000A6C9B0DFEB5F15A59FE396D5F2 Lifetime in days: 1758 Key size: 2048 Bound to services: SMTP Current Auth Certificate: True SAN Certificate: False Namespaces: Microsoft Exchange Server Auth Certificate Certificate: FriendlyName: Microsoft Exchange Thumbprint: 8CF11037A346A3BE602E99171FFB32C07F3F2196 Lifetime in days: 1784 Key size: 2048 Bound to services: IMAP, POP, IIS, SMTP Current Auth Certificate: False SAN Certificate: True Namespaces: EX01-2016 EX01-2016.exoip.local Certificate: FriendlyName: mail.exoip.com @ 2020/10/3 16:46:13 Thumbprint: 11A8E3212103DD17734E46F5F4DFEA1ABC41AD35 Lifetime in days: 5 Key size: 3072 Bound to services: IIS, SMTP Current Auth Certificate: False SAN Certificate: True Namespaces: autodiscover.exoip.com mail.exoip.com Certificate: FriendlyName: WMSVC-SHA2 Thumbprint: A520A23C9032B0D2B62BA812F2DBF91BB580D228 Lifetime in days: 3555 Key size: 2048 Bound to services: None Current Auth Certificate: False SAN Certificate: False Namespaces: WMSvc-SHA2-EX01-2016 Valid Auth Certificate Found On Server: True SMB1 Installed: True SMB1 Blocked: False SMB1 should be uninstalled SMB1 should be blocked More Information: https://techcommunity.microsoft.com/t5/exchange-team-blog/exchange-server-and-smbv1/ba-p/1165615 Security Vulnerability: CVE-2020-16875 See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-16875 for more information. Security Vulnerability: CVE-2020-16969 See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-16969 for more information. Security Vulnerability: CVE-2020-17083 See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17083 for more information. Security Vulnerability: CVE-2020-17084 See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17084 for more information. Security Vulnerability: CVE-2020-17085 See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17085 for more information. Security Vulnerability: CVE-2020-17117 See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17117 for more information. Security Vulnerability: CVE-2020-17132 See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17132 for more information. Security Vulnerability: CVE-2020-17141 See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17141 for more information. Security Vulnerability: CVE-2020-17142 See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17142 for more information. Security Vulnerability: CVE-2020-17143 See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17143 for more information. Security Vulnerability: CVE-2020-1147 See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-1147 for more information.Exchange Web App Pools---------------------- Web App Pool: GC Server Mode Enabled | Status MSExchangeServicesAppPool: False | Started MSExchangeMapiFrontEndAppPool: False | Started MSExchangeOWAAppPool: False | Started MSExchangeRestAppPool: False | Started MSExchangeMapiAddressBookAppPool: False | Started MSExchangeRpcProxyFrontEndAppPool: False | Started MSExchangePowerShellAppPool: False | Started MSExchangePowerShellFrontEndAppPool: False | Started MSExchangeRestFrontEndAppPool: False | Started MSExchangeMapiMailboxAppPool: False | Started MSExchangeOABAppPool: False | Started MSExchangePushNotificationsAppPool: False | Started MSExchangeOWACalendarAppPool: False | Started MSExchangeAutodiscoverAppPool: False | Started MSExchangeECPAppPool: False | Started MSExchangeSyncAppPool: True | Started MSExchangeRpcProxyAppPool: False | StartedOutput file written to .\HealthCheck-EX01-2016-20201227132103.txtExported Data Object Written to .\HealthCheck-EX01-2016-20201227132103.xml

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 with PowerShell script (3)

Generate Exchange health report

[PS] C:\scripts>.\HealthChecker.ps1 -BuildHtmlServersReport -HtmlReportFile "EX01-2016Report.html"

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

Exchange Server health check with PowerShell script (4)

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 Server health check with PowerShell script (5)

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.

[PS] C:\scripts>.\HealthChecker.ps1 -Server "EX02-2016"

The script created two files in the scripts folder.

Exchange Server health check with PowerShell script (6)

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.

[PS] C:\scripts>.\HealthChecker.ps1 -BuildHtmlServersReport

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

Exchange Server health check with PowerShell script (7)

Generate Exchange health report for all Exchange Servers

Another option is to run the cmdlet to create a report for all Exchange Servers. It will run the HTML report and open it automatically.

[PS] C:\scripts>Get-ExchangeServer | ?{$_.AdminDisplayVersion -Match "^Version 15"} | .\HealthChecker.ps1; .\HealthChecker.ps1 -BuildHtmlServersReport -HtmlReportFile "ExchangeAllServersReport.html"; .\ExchangeAllServersReport.html

If the report does not open automatically, you can find the report in the C:\scripts folder. Open the Exchange Server health report ExchangeAllServersReport.

Exchange Server health check with PowerShell script (8)

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.

Exchange Server health check with PowerShell script (2024)
Top Articles
Latest Posts
Article information

Author: Ray Christiansen

Last Updated:

Views: 5746

Rating: 4.9 / 5 (69 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.