Test-ServiceHealth – 1 Of 28 Test Cmdlets In Exchange 2010 SP1…

MS Exchange

Test-ServiceHealth – the cmdlet name speaks for itself. I was at a customer site yesterday and the fact that the 3rd line engineers didn’t know anything about the test cmdlets in Exchange 2010 has motivated me to write a series of 28 articles, describing each test cmdlet, what it does and how to use it. The first one that comes to my mind is Test-ServiceHealth, a very essential & easy tool to check whether your Exchange services are running as expected.

Test-ServiceHealth cmdlet checks the state of the Exchange services running on the server and outputs whether all the required services are running or not. If a service is not running, it will show you which one it is. If you have a server with different roles, it will check the services for each role and report based on the roles.

Test-ServiceHealth Cmdlet

Though the cmdlet outputs everything we need, we can customize the syntax with exactly what we need (to know whether all required services are running). Test-ServiceHealth | ft Role, RequiredServicesRunning –autosize gives you a better output.

Formatted test-servicehealth better output

You can query the service state on a different server by specifying the server name after the “server” parameter. The syntax is Test-ServiceHealth –Server servername | ft Role, RequiredServicesRunnning –autosize.

Test-ServiceHealth Server Remote

What if you want to see whether the required services are running on all servers you have? The cmdlet doesn’t output the server name and hence a small script is required.

$servers = Get-ExchangeServer

ForEach ($server in $servers) { Write-host “Server Name is” $server.name; Test-ServiceHealth $server | ft Role, RequiredServicesRunnning –autosize }

Test-ServiceHealth Small Script

Other Popular Articles


MS Exchange

Scripting Agent Initialization Failed: “File is not found” Error During Exchange 2016 Setup

MS Exchange

EAC Access While Co-Existing Exchange 2013 With 2010

MS Exchange

Delete All Calendar Entries In An Exchange 2010 Mailbox

  1. Hello Sir,

    I ran the above command in my environment, but it does not display the Requiredservices running as True or False. Its just blank. Could you please advise?

    $servers = Get-ExchangeServer

    ForEach ($server in $servers) { Write-host “Server Name is” $server.name; Test-ServiceHealth $server | ft Role, RequiredServicesRunnning –autosize }

    Reply

Leave a Comment

Set Microsoft Edge As Default Browser Using Intune

The video below goes through the process of setting up Microsoft Edge as the default browser on a Windows 11 machine using Intune.

Set Microsoft Edge As Default Browser On Windows 11 Using Intune

Getting Started With Entra ID

The video below is aimed at complete beginners who can master the Identity portion of Entra ID in about 90 minutes.

Getting Started With Entra ID - Complete Beginner's Guide

How To Remove Teams Sharing Toolbar While Presenting

The new version of Microsoft Teams bring the ‘annoying’ sharing toolbar in the top middle of the screen while you are presenting in a Teams meeting. There is no way to remove the toolbar which come in between various tabs in a browser or applications that you want to move around.

The video below explains a workaround to remove this sharing toolbar for good while presenting. Hopefully Microsoft will add an option within the app to remove this in the near future.

How To Remove Teams Sharing Toolbar While Presenting