Exchange Service Pack upgrade fails with an unexpected error in ServiceControl.ps1
Original KB number: 2034420
Symptoms
When you attempt to upgrade Exchange Server 2007 by using setup.com /m:upgrade
, the process mail fail during the Preparing Setup phase.
Performing Microsoft Exchange Server Prerequisite Check
Edge Transport Role Checks ......................... COMPLETED
Configuring Microsoft Exchange Server
Preparing Setup ......................... FAILED
An unexpected error has occurred and debug information is being generated: Unex
pected error [0xCF6CDA0B] while executing command '$error.Clear(); $RoleNames =
$RoleRoles.Replace('Role','').Split(','); if( test-path "$env:TMP\StoppedService
s.xml" ) { .\ServiceControl.ps1 Stop $RoleNames; } else { .\ServiceControl.ps1 S
ave; .\ServiceControl.ps1 Stop $RoleNames; .\ServiceControl.ps1 DisableServices
$RoleNames; }'.
Unexpected error [0xCF6CDA0B] while executing command '$error.Clear(); $Rol
eNames = $RoleRoles.Replace('Role','').Split(','); if( test-path "$env:TMP\Stopp
edServices.xml" ) { .\ServiceControl.ps1 Stop $RoleNames; } else { .\ServiceCont
rol.ps1 Save; .\ServiceControl.ps1 Stop $RoleNames; .\ServiceControl.ps1 Disable
Services $RoleNames; }'.
Exchange Server setup encountered an error.
Note
The hexidecimal code in this error may vary.
Cause
A Pre-Setup task was trying to execute ServiceControl.PS1 to stop all exchange services for the Exchange upgrade process. However, the ServiceControl.ps1 script has been flagged as Do Not Run
.
Resolution
- Open the Exchange Management Shell and change directory to
<Service Pack installation path>:\Setup\ServerRoles\common\
. - Run
.\ServiceControl.ps1
. - You will see the default setting is
[D] Do not run
. Enter option[A]
forAlways run
. - Close the Exchange Management Shell.
- From a command prompt, run
setup.com /m:upgrade
again.
More information
It's possible for the upgrade to fail while executing other scripts. You may be able to work around this by executing the required scripts from the Exchange Management Shell and allowing them to complete individually.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for