How to Use Get-HealthReport Command in Exchange Server?

Author : Shelly Bhardwaj | Updated on May 6, 2024 | Email Repair | Repair Exchange Database | 5 min read

Summary:To monitor and check the health of the Exchange Server, you can use the Get-HealthReport PowerShell command in the Exchange Management Shell (EMS). In this article, we will explain how to use Get-HealthReport command with different parameters. We will also mention an Exchange repair tool that can help recover data from corrupt or damaged databases.

Free Download For Windows

It is important to regularly monitor the health of Exchange Server and its various services. This helps detect issues that may have serious repercussions if left unattended. To check the health status of the services and processes, Exchange Server offers a PowerShell command, named Get-HealthReport.

This command gives output of the specified server, the status, the set or process name, alert value of the process, and the monitor count. You can also script the command to automate the process. This will help you to immediately identify if a critical process is either offline or unhealthy. This is ideal to output the data in either API or monitoring system to get alerts via email or SMS to tackle the issue immediately. Below, we will see how to use the Get-HealthReport PowerShell command in Exchange Server.

Process to Use Get-HealthReport Command in Exchange Server

Before running the Get-HealthReport command, you need some basic permissions. To get the permissions and roles needed, run the following command.

Get-ManagementRole -Cmdlet Add-MailboxDatabaseCopy

As you can see (in the above image), the following roles are needed.

  • View-Only Configuration
  • O365SupportViewConfig
To get the permissions needed for the role, you can run the following command.
$Permissions = Get-ManagementRole -Cmdlet Add-MailboxDatabaseCopy


$Permissions | foreach {Get-ManagementRoleAssignment -Role $_.Name -Delegating $false | Format-Table -Auto Role,RoleAssigneeType,RoleAssigneeName}

From the output of this command (see the above image), you need to assign the role of Organization Management and the Server Management. You can assign these roles via PowerShell in the Exchange Management Shell (EMS) or the Exchange Admin Center (EAC).

After assigning the required roles and permissions, you can run the command (as given below) by specifying the Identity (the server name) of the Exchange Server.

Get-HealthReport -Identity

The above command will return all the information on the specified Exchange Server.

If you don't want the output of all the components of the Exchange Server, you can run the command with the FL parameter (see the below example).

Get-HealthReport -Identity | FL

This will load all the information. You can see the HealthSet parameter, which is the grouping of each component.

If you want to only show the OWA.Protocol.Dep, you can run the command as given below.

Get-HealthReport -Identity -HealthSet

To get the information of the services which would directly impact the high availability of the Exchange Server in a Database Availability Group (DAG), you can use the HAImpactingOnly parameter (see the below example).

Get-HealthReport -Identity -HaImpactingOnly

You can see the state as Not Applicable, Online, or Offline.

You can also dig deeper into the health set to identity what is wrong with a specific component that forms part of the set.

If you want to only know the service which is Unhealthy, Degraded, or Disabled, then you can use the Alert Value parameter with the command.

Once you identify that a health set is not healthy, you need to identify the problematic component in the health set. For this, you can run the following command. This will point you to the right process that is failing or unhealthy.

 

Get-HealthReport -Identity -HealthSet | FT -autosize

I have looked to include some of the troubleshooting parts.

If there is problem with a specific database (showing the Unhealthy monitors), you cannot just delete the database. The reason for the problem would be limited space in the drive where the database is hosted.

If this is the case, an alternative is to disable the monitors using the Add-ServerMontioringOverride command (see the below example).

 

Add-ServerMonitoringOverride -ItemType Monitor -Identity "\" -PropertyValue 0 -PropertyName Enabled -Duration "60.00:00:00" -Server

Now, you will see the Alert Value as Healthy.

If the problem persists, you need to check the state of database using the ESEUtil command. If the database is in the Dirty Shutdown state, you can try to perform the Soft Recovery to fix small corruption issues. If it doesn't work, then perform the Hard Recovery. However, this option will only be used as a last resort as it purges anything which is deemed as corrupted.

Conclusion

Above, we have discussed how to use the Get-HealthReport PowerShell command in Exchange Server. You can monitor various services and processes using this command. You can also use monitoring scripts to ensure that all processes are running successfully. You can also customize the Get-HealthReport command to get the health of specific services and processes.

If the server crashes or services are interrupted, then this can lead to database corruption. In such a case, you can use the native tools of Exchange Server, such as the ESEUtil. But there is no guarantee that the data will be recovered. Alternatively, you can take the help of Exchange repair tool, such as Stellar Repair for Exchange. This will help in getting the server and data up and running with less effort and in less time. The application can easily open corrupted EDB file from any version of Exchange Server and with no size limit. It allows to granularly export the EDB data to PST and other file formats. It can also export data from the EDB file directly to a live Exchange Server database or Office 365. It can export all the EDB file items, including user mailboxes, user archives, shared mailboxes, disabled mailboxes, and even public folders.

Get Free Download Link

The software is not for Mobile. You can download the software on Windows/Mac Desktop or Laptop. Enter your Email ID below to get the download link.