This might not be a widely known fact, but Rollback in Windows 10 has been partially broken for a very long time (1803), and still is with current media of 1809 & 1903 as of today, 2019/08/20. In this post we deep dive into what the issue is and what you can do to fix it.
What is exactly broken? SetupRollback.cmd is not triggered in Windows if the machine fails the upgrade process.
Why should I care? If you have created your own SetupRollback.cmd file, or expect to leverage it in the case of an upgrade failure and the machine rolls back, you will not get the experience you are expecting. The Same goes for OS Uninstall (Revert back to Previous OS). You would need to rely on outside processes to restore full functionality to the machine. You know that folder in the In-Place Upgrade Task Sequence Template that says Rollback, with the condition _SMSTSSetupRollback = True.. guess what never gets set if the SetupRollback.cmd file never gets run? Yep, that variable to trigger the RollBack Section of your Upgrade TS.
What should I do if I need this? This is a two part fix. Both Windows upgrade media needs an update (Dynamic Update, August and newer for 1809) and ConfigMgr needs a Variable Set. As of now, I don’t know if there is a fix for Win 10 1903.. still coming? I have been told it will be built into Win 10 1909 whenever that is released.
- ConfigMgr: In the Task Sequence, you need to leverage /postrollbackcontext command, and set it to system (/postrollbackcontext system) otherwise it will try to launch SetupRollback.cmd in the user context, which helps nobody. This behavior is supposed to change in 1910, and that will be the default which we should be able to confirm at that point.
- Windows Upgrade Media: A couple ways to do this. Enable Dynamic Updates during your Upgrade. This by far is the easiest way, if your infrastructure can handle it. If it can’t be enabled, you’ll need to “inject” them into your offline media. There are several guides out there on how to accomplish this (including below), along with a community tool, OSDBuilder, which will help automate the process. Short Version.. Download the KB, extract the CAB file, copy the extracted files / folder structure into your Upgrade Media overwriting the files that were previously there.
Updating Offline Media (ConfigMgr 1809 Source Content)
Copy to your 1809 Upgrade Media
Now update your DPs with your latest upgrade media, and you’re set. Please make sure you’re also updating it with the other monthly patches and dynamic updates.
In the Task Sequence:
Set Variable Step:
Upgrade Step (If you can update Dynamic Updates):
Now with the Rollback Mechanism working properly, the Task Sequence is supposed to kick back in after the machines fails to upgrade, allowing you to run additional cleanup / diagnostic tasks (Like trigger SetupDiag for example).
Originally posted on RecastSoftware.com