r/SCCM • u/ccmexec1337 • 3d ago
SCCM Task Sequence fails after second reboot (TrustedInstaller/CBS) – Anyone else experiencing this?
Hi everyone,
We're experiencing an intermittent issue with SCCM/MECM non-OSD Task Sequences on Windows Server 2016.
During the Install Software Updates step, SCCM initiates the first reboot and the Task Sequence resumes successfully.
However, Windows sometimes triggers a second reboot through TrustedInstaller/CBS. After that, the Task Sequence occasionally fails to resume with:
Task Sequence Manager could not initialize Task Sequence Environment. Error 0x80070002
Interestingly, the _SMSTaskSequence directory and TSEnv.dat are still present.
The option "Retry this step if computer unexpectedly restarts" is enabled (5 retries), but doesn't always help.
The issue is intermittent. During our latest patching cycle, 4 out of 16 Task Sequences failed.
We already have an open Microsoft Support case, but no solution yet.
Has anyone experienced the same issue with non-OSD Task Sequences? Any known workaround or fix?
6
u/Reaction-Consistent 3d ago
We stopped using the install software updates step a couple years ago for similar issues. Updates failed to install consistently, and the task sequence never reported as finished in the console. Now I patch the images offline and it’s been working perfectly
2
u/Valdacil 3d ago
Some updates still cause a double reboot which isn't caught by the Task Sequence setting you reference. A good example is that I tried to get a task sequence to install the Hyper-V role, but Hyper-V role causes one of those reboots where it gets to the Windows logo then reboots again. This breaks the task sequence ever time. That setting to tell it to survive up to 5 unexpected reboots just doesn't work for those. I ended up having to put a cmd step in the task sequence for "shutdown -r -t 120" as the last step of the task sequence. This gave it 2 min to close out the task sequence so that it would be 'successful' then Windows rebooted to finish the Hyper-V role install.
That scenario doesn't necessarily fix your problem of Install Software Updates step failing due to a double reboot in one of the patches but is an example of how that trapping for unexpected reboots isn't fool proof.
1
u/Bassflow 3d ago
Try setting the task sequence deployment to download all of the content before running.
1
u/PavYur 2d ago
Let's say there is no good solution at this point: there is currently no way for TS to figure out the second reboot is imminent and save the data.
If you're really up to keep using the TS, consider some weird automation, like disable the CCMExec/SMSTSMgr services before installing updates - and re-enabling them afterwards by catching EventID 19 (or 20) once updates are installed.
Microsoft Support can also give you a bit of palliative approach I can't disclose at Reddit.
1
u/TheHolsh 3d ago
Uup updates aren't really supported with SCCM test sequences anymore. You better off just installing those after the fact or updating the iso's monthly
-1
u/rogue_admin 3d ago
Why would you install software updates with a task sequence? No one does that