Exchange ServerTroubleshooting

Setup previously failed while performing the action: recovering a failed Exchange upgrade

Exchange setup says it previously failed during Install or BuildToBuildUpgrade? Find the real error, resume with the same build and media, and treat Watermark cleanup as a last resort.

When a cumulative update or a fresh install dies halfway, Exchange setup remembers exactly where it stopped and refuses to do anything else until that job is finished. That's what "Setup previously failed while performing the action" means. In this post I'll show how to read the message, find the real failure in ExchangeSetup.log and resume safely with the same build, plus the one workaround to keep for last.

Errors this guide fixes

  • Setup previously failed while performing the action "Install". You can't resume setup by performing the action "BuildToBuildUpgrade".Exchange setup
  • Setup previously failed while performing the action "BuildToBuildUpgrade". You can't resume setup by performing the action "Install".Exchange setup
  • Setup previously failed while performing the action "BuildToBuildUpgrade". You can't resume setup by performing the action "Uninstall".Exchange setup
  • The Exchange Server setup operation didn't complete.Exchange setup
  • Cannot start the service Microsoft Exchange Service HostExchange setup (CU)+1 more guide
  • Setup previously failed while performing the actionExchange setup
  • A Setup failure previously occurred while installing the HubTransportRole role.Exchange setup readiness checks
How this guide is organised: Symptoms → Why it happens → How to fix it → Verify the fix → Prevent it next timeFlow diagram of the article's sections in reading order: 1. Symptoms. 2. Why it happens. 3. How to fix it (5 steps: Find the real failure; Fix that cause; See what setup recorded; Resume with the same action and the same media; Last resort: clear the watermark). 4. Verify the fix. 5. Prevent it next time. Toolbox: ExchangeSetup.log, ServiceControl.log, Test-ServiceHealth, Get-ServerComponentState, MailboxRole.1Symptoms2Why it happens3How to fix it4Verify the fix5Prevent it nexttime1Find the real failure2Fix that cause3See what setuprecorded4Resume with thesame action and t…5Last resort: clearthe watermarkTOOLBOXExchangeSetup.logServiceControl.logTest-ServiceHealthGet-ServerComponentStateMailboxRoleHow this guide is organised: Symptoms → Why it happens → How to fix it → Verify the fix → Prevent it next timeFlow diagram of the article's sections in reading order: 1. Symptoms. 2. Why it happens. 3. How to fix it (5 steps: Find the real failure; Fix that cause; See what setup recorded; Resume with the same action and the same media; Last resort: clear the watermark). 4. Verify the fix. 5. Prevent it next time. Toolbox: ExchangeSetup.log, ServiceControl.log, Test-ServiceHealth, Get-ServerComponentState, MailboxRole.1Symptoms2Why it happens3How to fix it1Find the real failure2Fix that cause3See what setup recorded4Resume with the same action and the samemedia5Last resort: clear the watermark4Verify the fix5Prevent it next timeTOOLBOXExchangeSetup.logServiceControl.logTest-ServiceHealthGet-ServerComponentStateMailboxRole
At a glance: how this guide is organised · 5 fix steps · 5 key tools

Symptoms#

Setup stops within seconds with one of these combinations, followed by a pointer to the setup log:

Text
Setup previously failed while performing the action "Install". You can't resume setup by performing the action "BuildToBuildUpgrade".

Setup previously failed while performing the action "BuildToBuildUpgrade". You can't resume setup by performing the action "Install".

Setup previously failed while performing the action "BuildToBuildUpgrade". You can't resume setup by performing the action "Uninstall".

The Exchange Server setup operation didn't complete. More details can be found in ExchangeSetup.log located in the <SystemDrive>:\ExchangeSetupLogs folder.

A related readiness check can fail instead, once for each affected role (the role name varies): A Setup failure previously occurred while installing the HubTransportRole role. Either run Setup again for just this role, or remove the role using Control Panel.

The server usually still shows the side effects of the first failure: Exchange services stopped and set to Disabled, a retry that ends with Cannot start the service Microsoft Exchange Service Host, Outlook on the web errors, no mail flow, or components left Inactive (see Exchange components stuck Inactive after an update).

Why it happens#

As setup works through each role, it records its progress in the registry under HKLM\SOFTWARE\Microsoft\ExchangeServer\v15\<Role>, for example MailboxRole, ClientAccessRole or HubTransportRole:

  • Action: what setup was doing, such as Install, BuildToBuildUpgrade (setup's name for a CU upgrade) or Uninstall.
  • Watermark: the last step it completed.

A successful run removes both values. When they're still there, the next run compares the recorded action with the one you're starting: the same action resumes from the watermark, a different action is refused with this error. That's why uninstalling a server whose upgrade never finished, or starting a fresh install over a failed upgrade, hits the message straight away.

How to fix it#

Watch out: Don't delete the Exchange server object in ADSI Edit or rebuild the machine just to get past this message. The server object holds configuration that databases, connectors and certificates depend on. If a server is truly lost, rebuild it with the same name and use Setup.exe /Mode:RecoverServer instead.

1. Find the real failure#

The message only tells you that an earlier run failed; the reason is in C:\ExchangeSetupLogs\ExchangeSetup.log. Read the last errors, or let the SetupLogReviewer script from Microsoft's CSS-Exchange project match them against known issues:

PowerShell
Select-String -Path 'C:\ExchangeSetupLogs\ExchangeSetup.log' -Pattern '\[ERROR\]' |
  Select-Object -Last 15 | ForEach-Object Line
.\SetupLogReviewer.ps1 -SetupLog 'C:\ExchangeSetupLogs\ExchangeSetup.log'

C:\ExchangeSetupLogs\ServiceControl.log records which services setup disabled.

2. Fix that cause#

Typical culprits are services that wouldn't stop (restart the server before setup), antivirus interference (apply the documented exclusions or turn it off during setup), a pending restart or missing prerequisite (Exchange setup prerequisite errors) and Active Directory preparation (PrepareSchema and PrepareAD errors).

3. See what setup recorded#

PowerShell
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15' |
  ForEach-Object { Get-ItemProperty -Path $_.PSPath } |
  Where-Object { $_.Action -or $_.Watermark } |
  Select-Object PSChildName, Action, Watermark

4. Resume with the same action and the same media#

Restart the server, mount the ISO you originally used and run setup from an elevated prompt with an explicit path. A bare setup.exe in PowerShell can start the older copy in the Exchange Bin folder instead.

Command Prompt
D:\Setup.exe /Mode:Upgrade /IAcceptExchangeServerLicenseTerms_DiagnosticDataOFF

If the recorded action is Install, rerun the original install command with the same roles. Either way, setup picks up from the watermark.

If setup can't even start because services are Disabled (Cannot start the service Microsoft Exchange Service Host), restore the services that were running before the update, rename C:\ExchangeSetupLogs (for example to ExchangeSetupLogs-OLD) as Microsoft's troubleshooting article advises, then run the upgrade command again:

PowerShell
Set-Location (Join-Path $env:ExchangeInstallPath 'Bin')
Add-PSSnapin -Name Microsoft.Exchange.Management.PowerShell.Setup -ErrorAction SilentlyContinue
.\ServiceControl.ps1 AfterPatch
Get-Service -DisplayName 'Microsoft Exchange*' | Format-Table DisplayName, StartType, Status

The POP3 and IMAP4 services are stopped and not set to start automatically by default; leave them that way unless you use them.

5. Last resort: clear the watermark#

If you genuinely can't complete the recorded action (for example, you must uninstall a server whose upgrade can't be finished), the widely used community workaround is to back up the role key, delete its Action and Watermark values and run setup again so it starts that role from the beginning:

PowerShell
reg export 'HKLM\SOFTWARE\Microsoft\ExchangeServer\v15\MailboxRole' "$env:USERPROFILE\MailboxRole-backup.reg"
Remove-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\MailboxRole' -Name Action, Watermark

Only touch the role keys that step 3 listed, and only after the underlying problem is fixed. Clearing the watermark repairs nothing by itself.

Verify the fix#

  • Setup ends with The Exchange Server setup operation completed successfully. Restart the server afterwards.
  • The registry query from step 3 returns nothing.
  • The file version matches the build you installed: Get-Command ExSetup.exe | ForEach-Object { $_.FileVersionInfo }.
  • Test-ServiceHealth shows RequiredServicesRunning : True for every role, and Get-ServerComponentState $env:COMPUTERNAME | Where-Object State -ne 'Active' lists only ForwardSyncDaemon and ProvisioningRps, which are normally Inactive on-premises.
  • You've installed the latest Security Update for the new CU (installing Exchange security updates) and the Health Checker comes back clean.

Prevent it next time#

  • Restart the server before every CU, run setup elevated with an explicit path, and keep antivirus exclusions in place.
  • Run Health Checker and SetupAssist (aka.ms/ExSetupAssist) beforehand; they catch pending restarts and AD problems early.
  • Patch one server at a time in maintenance mode (patching a DAG without downtime).
  • Keep the ISO of the installed CU; repairs and some update errors ask for the original media.

References#

Revision history: Oct 2026 — re-checked against Microsoft Learn: details confirmed.

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)