• Home
  • Topics
    • Office 365
    • Teams
    • SharePoint Online
    • Exchange 2019
    • Exchange 2016
    • Exchange 2013
    • Hybrid
    • Certificates
    • PowerShell
    • Migration
    • Security
    • Azure
  • Blog
  • Podcast
  • Webinars
  • Books
  • About
  • Videos
    • Interview Videos
    • How To Guide Videos
  • Subscribe
    • Facebook
    • Twitter
    • RSS
    • YouTube

Practical 365

You are here: Home / Exchange Server / Exchange Server 2013: Using Test-ServiceHealth to Verify Required Services are Running

Exchange Server 2013: Using Test-ServiceHealth to Verify Required Services are Running

August 7, 2013 by Paul Cunningham 15 Comments

The Test-ServiceHealth PowerShell cmdlet will check that the required services for the Exchange Server 2013 roles installed on a server are running. This includes services that Exchange itself installs, as well as those in the operating system that Exchange depends on.

For servers installed with only the Client Access server role please note this bug.

Running Test-ServiceHealth on a server will check the services on the local server.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[PS] C:\>Test-ServiceHealth
 
Role                    : Mailbox Server Role
RequiredServicesRunning : True
ServicesRunning         : {IISAdmin, MSExchangeADTopology, MSExchangeDelivery,
                          MSExchangeIS, MSExchangeMailboxAssistants,    
                          MSExchangeRepl, MSExchangeRPC, MSExchangeServiceHost,
                          MSExchangeSubmission, MSExchangeThrottling,
                          MSExchangeTransportLogSearch, W3Svc, WinRM}
ServicesNotRunning      : {}
 
Role                    : Client Access Server Role
RequiredServicesRunning : True
ServicesRunning         : {IISAdmin, MSExchangeADTopology,
                          MSExchangeMailboxReplication, MSExchangeRPC,
                          MSExchangeServiceHost, W3Svc, WinRM}
ServicesNotRunning      : {}
 
Role                    : Unified Messaging Server Role
RequiredServicesRunning : True
ServicesRunning         : {IISAdmin, MSExchangeADTopology, MSExchangeServiceHost,
                          MSExchangeUM, W3Svc, WinRM}
ServicesNotRunning      : {}
 
Role                    : Hub Transport Server Role
RequiredServicesRunning : True
ServicesRunning         : {IISAdmin, MSExchangeADTopology, MSExchangeEdgeSync,
                          MSExchangeServiceHost, MSExchangeTransport,
                          MSExchangeTransportLogSearch, W3Svc, WinRM}
ServicesNotRunning      : {}


You will notice that the server roles in the output above do not align with the new server role architecture of Exchange Server 2013. This may change in a future version of the cmdlet, but for now you can still use the results to identify required services that are not running.

Test-ServiceHealth can also be run against remote servers.

1
[PS] C:\>Test-ServiceHealth -Server E15MB3


If a required service is not running you will see the RequiredServicesRunning result set to False, and the ServicesNotRunning result will list the names of the services.

1
2
3
4
5
6
7
8
9
10
[PS] C:\>Test-ServiceHealth -Server E15MB3
 
Role                    : Mailbox Server Role
RequiredServicesRunning : False
ServicesRunning         : {IISAdmin, MSExchangeADTopology, MSExchangeDelivery,
                          MSExchangeIS, MSExchangeMailboxAssistants,
                          MSExchangeRepl, MSExchangeRPC, MSExchangeServiceHost,
                          MSExchangeSubmission, MSExchangeThrottling,
                          MSExchangeTransportLogSearch, WinRM}
ServicesNotRunning      : {W3Svc}


You can quickly start a service using Invoke-Command to issue the command to the remote server.

1
[PS] C:\>Invoke-Command -ComputerName E15MB3 {Start-Service W3Svc}


Tip: If the service that is not running is WinRM then PowerShell remoting will not work, so you will need to log on directly to the server or use the Services management tool to remotely connect.

Exchange Server Exchange 2013, PowerShell, Test-ServiceHealth

Comments

  1. salih says

    December 13, 2020 at 6:29 pm

    hi,
    this week I get same error from report.I chechek it win RM service that it running.
    when I check other exc. services , ı notice that Microsoft Exchange EdgeSync is not runing.
    I started it and then test-servicehealth cmd .I see that everything is OK.

    Reply
  2. clifford says

    May 21, 2020 at 7:17 pm

    HI I am running exchange 2016

    I ran the script and get Mailbox server role services fail

    and
    Mailbox server roles services fail

    Reply
  3. Francho says

    April 21, 2020 at 8:31 am

    Hi, I can’t find the Test-ServiceHealth command

    There is a list of modules content and how to import it.

    Thank you

    Reply
  4. Terry says

    March 4, 2019 at 1:11 pm

    You forgot adding the point that the command Test-ServiceHealth should be ran within Exchange Management shell.

    Reply
  5. Marcin says

    October 24, 2018 at 8:35 pm

    Hi Paul,

    Unified Message Service fails on one of the exchange servers. I am not able to invoke MSExchangeUM service. It fails with “Failed to start Service “Microsfot Exchange Unified Messaging. OpenError (System.ServiceProcess.ServiceController:ServiceController)”

    I rebooted the server to no avail. Do you have any suggestions?

    Thank you,
    Marcin

    Reply
  6. Gibra says

    May 29, 2018 at 8:39 pm

    Hi how can I disable EDGE service status test?
    I’m not using EGDE role and script is giving error output for HUB transport role because “MSExchangeEdgeSync” is stopped.

    thanx in advance.

    Reply
    • Paul Cunningham says

      May 30, 2018 at 10:05 am

      Either start the service, or you’ll need to customize your script to ignore that result when the MSExchangeEdgeSync service is stopped.

      Reply
  7. Benoit says

    June 15, 2017 at 11:29 pm

    Hello,

    We a problem with our exchange server 2013.
    The Microsoft Transport Log Search takes high cpu (60%). We have to reboot the service every 4 hours.

    How to resolve this issue ?

    Thanks for help

    Reply
    • Paul Cunningham says

      June 16, 2017 at 10:54 am

      Make sure you’re updated to the latest CU for Exchange 2013. Make sure nobody is running big searches or scripts that query the transport logs.

      Reply
      • Benoit says

        June 17, 2017 at 12:23 am

        Thanks for your answer but how to check if searches or queries running ?

        Reply
  8. Pistol says

    December 12, 2014 at 2:11 am

    Hi!

    Thanks for the great script. I have a prolem though. If i use the -serverlist parameter it seems the output gets screwed up. I mean the installed roles and other parameters are incorrect.

    For example this is correct:

    [PS] C:inetpubwwwroot>.Test-ExchangeServerHealth.ps1 -server voexc04w -log -reportmode:$true
    Initializing…
    —— Checking voexc04w
    DNS Check: Pass
    Ping Check: Pass
    Uptime (hrs): 242
    Server version: Exchange 2010
    Roles: ClientAccess, HubTransport
    Client Access Server Role Services: Pass
    Hub Transport Server Role Services: Pass
    Total Queue: 106
    —— Finishing
    Done.

    This is NOT (note the serverlist file contains the same server):

    [PS] C:inetpubwwwroot>.Test-ExchangeServerHealth.ps1 -serverlist C:inetpubwwwrootserverlist.txt -log -reportmode:$true
    Initializing…
    —— Checking voexm04w
    DNS Check: Pass
    Ping Check: Pass
    Uptime (hrs): 1121
    Server version: Exchange 2010
    Roles: Mailbox
    Mailbox Server Role Services: Pass
    Mailbox databases mounted: Pass
    MAPI connectivity: Success
    Mail flow test: *FAILURE*
    —— Finishing
    Done.

    I cant seem to find the cause. Any help is much appreciated
    Thanks in advance,
    Pete

    Reply
    • Pistol says

      December 12, 2014 at 2:39 am

      Sorry, my mistake. Its really late at work:)

      Reply
  9. Jason says

    November 9, 2013 at 1:35 am

    Great site.

    This also works on Exchange 2010 SP2

    Reply
  10. Bandi says

    September 21, 2013 at 12:37 am

    I’m in an Exchange 20072013 coexistence. Exchange 2007 SP3 and Exchange 2013 CU2. The Transport Services won’t start on the Exchange 2013 server.

    Reply

Leave a Reply Cancel reply

You have to agree to the comment policy.

Recent Articles

  • Turn On MFA: Real-World Example of Fraud, Domain Stealing, and the Nearly Lost House Deposit
  • Changes in Microsoft 365 Apps Channels and Why You Should Care
  • A New Tool to Manage Exchange-related Attributes Without Exchange Server
  • Microsoft Launches Group Ownership Governance Policy
  • Making the Case for Identity Governance in Azure Active Directory

Copyright © 2022 Quadrotech Solutions AG · Disclosure · Privacy Policy
Alpenstrasse 15, 6304 Zug, Switzerland