r/SCCM • • 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?

4 Upvotes

29 comments sorted by

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

1

u/ccmexec1337 2d ago

Offline patching isn't a viable solution for us because we also need to install and update applications, including Microsoft Office, which cannot be handled through standard Windows offline servicing. We need a fully automated patching process that covers both Windows and application updates.

1

u/Reaction-Consistent 2d ago

I guess I missed the part where you said it was a non-OSD task sequence, sorry, my bad. But still, I am puzzled- is the server already built, up and running, and you are running a task sequence on it to essentially finish it off with additional OS patches, application patches and such?

1

u/ccmexec1337 1d ago

It is an existing server OS (master image server) that is to be automatically updated with patches and software.

1

u/Reaction-Consistent 9h ago

Just for the applications alone, try using an application group to install the apps sequentially. For the software updates, create a maintenance window and deploy the software updates as you normally would any windows OS update i.e. using a software update group and a deployment to a collection. You can deploy the application group and the software update group to the same collection with the maintenance window. As long as the maintenance window is long enough to accommodate all of the software updates and the applications they should all install without issue in their own CM decided order.

1

u/Reaction-Consistent 9h ago

You can also try breaking up the task sequence into multiple separate task sequences, one for applications, one for software updates, schedule them to install one after the other. It might take a bit of trial and error to work out the timing and make sure everything works as expected with reboot and task, sequence, continuation, etc..

1

u/Reaction-Consistent 9h ago

And finally, I believe you can set task sequences as dependencies on applications , just another way to potentially sequence all of the various installs and updates

2

u/ccmexec1337 8h ago

Thanks for the constructive suggestions.

The main requirement is a fully automated and deterministic image maintenance process, including application installations, Windows and Office updates, configuration changes, controlled reboots and a clearly defined completion status.

Separate deployments within a maintenance window do not guarantee the required execution order or provide a single, reliable completion status for the entire process.

Splitting the task sequence into multiple scheduled task sequences introduces timing dependencies and additional complexity. It also does not resolve the underlying issue with the Install Software Updates step.

The existing task sequence already provides the functionality we need. The only issue is that it occasionally fails to resume after an update-triggered reboot.

Microsoft Support has already submitted a product issue work item for evaluation by the ConfigMgr Product Group.

Rather than redesigning an otherwise functional automation process around a product defect, I would prefer to see the underlying issue resolved.

1

u/Reaction-Consistent 8h ago

Understood, and good luck hopefully, Microsoft engineers can fix your problem like they were able to fix my recent issue, in a reasonable amount of time, and with a minimal amount of back-and-forth, escalation, etc.

2

u/Peteostro 3d ago

This. One easy way to do this is download the monthly patched windows iso from Microsoft and then add it to config manager and the OSD task sequence

2

u/Steve_78_OH 3d ago

I do the same, but I wish the monthly .iso would come out closer to Patch Tuesday.

2

u/atsnut 2d ago

Probably best that it doesn’t come out close to Patch Tuesday, especially if there’s an issue with that CU.

2

u/Steve_78_OH 2d ago

Sure, but 3-5 days after is usually enough time for Microsoft to pull problematic updates. Two weeks after Patch Tuesday is still a BIT long.

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/ccmexec1337 2d ago

That's exactly the issue we're experiencing. Unfortunately, the second reboot happens during the "Install Software Updates" step, so the task sequence never reaches any subsequent steps. A delayed reboot at the end wouldn't help in our case. Even with 5 unexpected reboot retries enabled, the TS fails to resume.

1

u/Bassflow 3d ago

Try setting the task sequence deployment to download all of the content before running.

1

u/ccmexec1337 2d ago

Thanks for the suggestion, but this doesn't appear to be a content download issue. The updates install successfully, but the task sequence fails to resume after the second reboot. The TS environment isn't properly restored, so pre-downloading content is unlikely to help.

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/ccmexec1337 1d ago

ok Microsoft Support Case is closed, its bug in SCCM. Workaround from microsoft ist patching manually by hand ... thanks microsoft

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

2

u/PavYur 2d ago

Installing updates in TS is totally supported (no matter UUP or not). Offline servicing isn't possible with UUP.

0

u/ccmexec1337 2d ago

We're patching Windows Server 2016/2022, so UUP updates aren't relevant here. Also, installing software updates through ConfigMgr task sequences is officially supported by Microsoft. Updating ISOs doesn't apply to our existing server VHDs.

-1

u/rogue_admin 3d ago

Why would you install software updates with a task sequence? No one does that

0

u/ccmexec1337 2d ago

Because we're patching existing Windows Server 2016/2022 VHDs in an automated SCCM workflow. Task sequences allow us to control the entire patching process, including application updates, Windows updates, and reboots. This is a fully supported ConfigMgr feature. Whats your solution way ?

0

u/rogue_admin 2d ago

I really don’t care if it’s supported or not, but you can die on that hill if you want to or move on to native software update management like the rest of the world and let go of trying to prove some point. Use what works, abandon obsolete methods that don’t work, it’s as simple as that, or else you fail as an admin and you fail at life

1

u/ccmexec1337 1d ago

You're dodging the question—what works? What's your solution? What is the whole world switching to?

0

u/rogue_admin 1d ago

I’m not dodging the question, I said native software update management in config mgr, you don’t know what that is? That’s fine, it’s kind of hard to believe, but no one has patched with task sequences since before windows 10 came out because at the time cumulative updates did not exist like they have since 2014. Config mgr deploys software updates natively, and it has for a long time, this is the correct way to use the product and this is where all of the features are. The issue you’re having, it’s a windows problem, but using task sequences is ridiculous and seems to exaggerate these issues. Yes, the rest of the world uses native software update deployments and has for a long time now, some people have not even been around long enough to remember how awful it was to patch windows 7 with task sequences and it’s still a terrible option. Config mgr features are 95% solid and reliable, but there are a few methods that don’t work well and most people know to avoid those options rather than keep fighting and struggling, so make your choice, do you want to patch your devices or do you want to prove your stupid point? Good luck

1

u/ccmexec1337 8h ago

I'm fully aware of native software update deployments in ConfigMgr. You're missing the point of this specific use case.

We're not talking about regular patching of production servers. We're talking about an automated image maintenance process for Windows Server VHDs, including Windows updates, Office updates, application installations and additional configuration steps within a controlled workflow.

Native software update deployments alone do not replace this workflow.

Microsoft Support has already created a product issue work item based on our findings for evaluation by the ConfigMgr Product Group.

I'm interested in technical solutions, not personal opinions about whether a documented and supported ConfigMgr feature should be used.

If you have a fully automated alternative that covers all these requirements, I'm genuinely interested. Personal insults, however, don't contribute anything to this discussion.

1

u/rogue_admin 1h ago

A proper workflow would always use the latest image and no updates would be needed, so either way this is a fail