Forum Discussion

texexpat's avatar
texexpat
Copper Contributor
Nov 22, 2022

Exchange services won't start and cannot install or uninstall a SU

We have an Exchange hybrid environment with two clustered Exchange 2016 servers running on Windows 2016.  One server (ExchangeA) has the latest Windows patches and the November 2022 Exchange SU and is running normally.  The other server (ExchangeB) has the latest Windows patches, and I manually installed the October 2022 Exchange SU a few weeks ago.  It was also running normally.

 

Overnight last night, all the Exchange services went down and were disabled on ExchangeB.  This morning, the Control Panel on ExchangeB indicated that the Security Update for Exchange Server (KB501977) was installed overnight, but that is the same SU that I had already installed a few weeks ago.  I tried setting all the services to automatic and starting the Miocrosoft Exchange Active Directory Topology service, but it immediately failed to start.  In the Application log is a .NET Runtime error 1206 "The process was terminated due to an unhandled exception."  There is an exception code e0434352 which apparently is rather generic.

 

I tried running Windows Update manually to install the latest Exchange SU (KB5019758), but that failed.  I then downloaded KB5019758 and ran it from an elevated command prompt, but that also failed.  I also tried running the uninstall of the other SU from within Control Panel, but that also fails.

 

Does anyone know why I can't seem to get past this problem SU installation or how I can proceed with a good SU installation?

 

Thank you very much for your help with this.

 

 

  • texexpat's avatar
    texexpat
    Copper Contributor

    I have the solution to this and will post it here in case anyone else needs it.

     

    After the failed attempt to install the Exchange Security Update, I saw the following error in the log file  C:\ExchangeSetupLogs\ServiceControl.log:

    "[Error] System.Management.Automation.CommandNotFoundException: The term 'Stop-SetupService' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."

     

    So it was trying to call a cmdlet that doesn't exist.  I didn't know how to make an alias available to the installation routine, but a Microsoft support tech solved that.

     

    Edit the ServiceControl.ps1 file (located in %ExchangeInstallPath%\Bin).  In that file, locate the section near the top that starts with "param(".  Find the closing parentheses for that section and add a new line of text between that and  the line "#Disable ExecutionPolicy in this PowerShell script".  The line you add will be the alias for the script to use:

     

    New-Alias Stop-SetupService Stop-Service

     

    Thus this section will wind up looking like this:

    ------------------------------

     

    param(

    [string]$Operation,

    [string[]]$Roles,

    [string]$Version = $RoleTargetVersion,

    [string]$SetupScriptsDirectory = $null)

     

    New-Alias Stop-SetupService Stop-Service

     

     

    # disable ExecutionPolicy in this PowerShell context

     

     

    After saving this edit, run the update (SU) again.  In my case, it ran normally and installed successfully.  After the requisite restart, Exchange started and ran normally.

     

    I hope this helps someone.

     

     

Resources