In this article, we will discuss how to fix the “restart-service MSExchangeServiceHost” error received in the fourth step of the Exchange Server 2019 CU10 update. In this step of the “Cumulative Update 10” installation, you may encounter the following example error message.
Error: The following error was generated when "$error.Clear(); if (get-service MSExchangeServiceHost* | where {$_.name -eq "MSExchangeServiceHost"}) { restart-service MSExchangeServiceHost } " was run: "Service 'Microsoft Exchange Service Host ( MSExchangeServiceHost)' cannot be started due to the following error: Cannot start service MSExchangeServiceHost on computer '.'.".
Resolving the “restart-service MSExchangeServiceHost” Error
To resolve this error, start the “Microsoft Exchange Active Directory Topology” service. After the successful startup of the service is complete, you can restart the Exchange Server CU10 installation.
Note: If the same error is encountered at this step of the Exchange Server CU10 installation process, change the startup type from “Disabled” to “Automatic” without starting Exchange services and start the installation wizard again.
Get-Service | where{$_.Name –Like 'MSExchange*'} | set-Service –StartupType 'automatic'