Forum Discussion
Exchange services won't start and cannot install or uninstall a SU
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.
- SchaffJun 10, 2025Copper Contributor
Over two years later and this fixed our server after a failed update. Thanks for coming back and providing the fix. Much appreciated!