How to Use Get-ServerHealth Cmdlet in Exchange Server?

It is important to regularly check the health of Exchange Server to ensure its smooth functioning and to prevent any unexpected incidents. To check the health information about Exchanger Server, you can use the Get-ServerHealth command. This PowerShell command is available in on-premises Exchange Server versions 2013, 2016, and 2019. For Exchange Online, you can use the health portal to know the status of the system and check for any incidents.

The Get-ServerHealth command provides health values which will give you an indication of the state of your Exchange Server. When executed, this command returns the following values:

  • Degraded
  • Unhealthy
  • Repairing
  • Disabled
  • Unavailable
  • Uninitialized

How to Use the Get-ServerHealth Command?

To run this command, you need to have the necessary permissions. Below are the needed permissions.

  • View-Only Configuration
  • O365SupportViewConfig

You can also run the following command to get the list of the permissions needed.

Get-ManagementRoles -Cmdlet Get-ServerHealth

command to get the list of the permissions needed

After getting the required permissions, you can run the Get-ServerHealth command. For this, open the Exchange Management Shell (EMS) and run the command as follows.

Get-ServerHealth -Identity

Get-ServerHealth -Identity

This will give you the status of all the Exchange Server components.

You can use other switches with the command, such as HaImpactingOnly. This switch will roll up only monitors that have HaImpacting set to True

Get-ServerHealth -HalImpactingOnly -Identity

You can use other switches with the command, such as HaImpactingOnly

You can also use the Healthset switch to get the health of a group of monitors.

Get-ServerHealth -Healthset -Identity

Other Monitoring Considerations

The Get-ServerHealth command provides a good option to regularly test the health of the Exchange Server. However, you can also consider other tools, such as the server health script. This will give you more information to optimize your server, along with the security considerations and mitigations needed to secure your server.

In addition, you must monitor the uptime, services, and the operating system that hosts the Exchange Server. If the server is a physical one, it is suggested to monitor the hardware and RAID configuration. If the server is on a virtual machine, you must monitor the underlying hypervisor.

What to do if something happens?

If an unforeseen issue occurs, you need to be prepared. The Exchange Server may get failed due to sudden power cut, installation of third-party software like antivirus or backup software which is not application aware, issue during installation of Cumulative Updates or other updates, or simply a human error. This can lead to corruption of the Exchange Server transaction logs and databases.

You need to recover from such situations as soon as possible, while ensuring that there is no data loss. There are native tools that can help but they require a lot of time and resources, leading to extended downtime. To recover from such situations within minimum time, you can use the Exchange Server Recovery applications, like Stellar Repair for Exchange. With this application, you can easily open any EDB file - be it in dirty shutdown or fail to mount state, with no size limit. If there is a failure, you can easily re-install the Exchange Server and use the application to directly export the recovered mailboxes, user archives, public folders, shared mailboxes, and disabled mailboxes to the live Exchange Server database.

Was this article helpful?
About The Author
author image
Shelly Bhardwaj linkdin Icon

Shelly is technology expert and core knowledge of Exchange Server, Outlook.

Table of Contents


Why Choose Stellar?
  • 0M+


  • 0+

    Years of Excellence

  • 0+

    R&D Engineers

  • 0+


  • 0+


  • 0+

    Awards Received