ConfigMgr Console
Run Task Sequence
Topics: ConfigMgr Console
Task Sequence Steps – Run Task Sequence
This post is part of our Task Sequence – Beyond the Docs series.
This step came about in the past couple of year, and totally changed the way we build task sequences. It allows us to redesign our task sequences in a more logical, modular way. Previously, you’d have a large task sequence, and you might have the same group of identical steps in several task sequences, and you’d have to go back an update each task sequence when you make a change to one to make sure they would stay in sync. Now, along comes “Run Task Sequence”, and we can pull out functions or groups of steps that might be leveraged in several other task sequences, or just a way to keep things organized.
MS Docs: Microsoft documentation on running task sequence.
PowerShell
- Get-CMTSStepRunTaskSequence
- New-CMTSStepRunTaskSequence
- Remove-CMTSStepRunTaskSequence
- Set-CMTSStepRunTaskSequence
Example in script – GitHub – this script make a copy of a parent TS, looks through the parent, finds any “Run Task Sequence” Steps, and makes copies of all of those Task Sequences, then replaces the Parent TS Copy with the copies of all the Child Task Sequences, so you have a completely new set of Task Sequences for exporting or testing without worrying about modifying any of the original task sequences.
Step Image
There are some things to consider, the one that typically gets me is that you can’t call a task sequence that has associated boot media. Example of how I worked around this.
Recently I wanted to take a working OSD Task Sequence and add a “Debug” Mode Front End to the Task Sequence without effecting the main production task sequence. I created a new Task Sequence called “OSD Debug”, then tried to add the primary OSD Task Sequence to it, but could not, because it had boot media associated with it. Work-around. Remove the Boot Media from the Main Task Sequence. Create 2 New Task Sequences, OSD Production and OSD Debug. Both have the Boot Media associated with them. OSD Production was one step, Run Task Sequence and pointed at the Primary OSD Task Sequence. OSD Debug added several steps, including a front end to create several variables to test the task sequences condition logic. This worked great.
There are several other limitations list in the docs, so if you’re wondering why something might not be behaving the way you expect, check that the step limitations.
The Logs
You see in the logs, that it’s not the easiest thing to pick out Child Task Sequences, as they are reported as Groups. You will have to know the name of the Step, to find the information in logs.
Potential Fixes
When I’ve had issues with odd things happening, content not showing properly, items in the child task sequence not working properly even though I know I made a change, a quick fix that has been good to me, in the parent, remove the “Run Task Sequence” step, save the Parent, go back in, and add the Step back. That will refresh the policy and seems to resolve most of the issues I have with this step.
Image of the Step in Production
Find all of our Task Sequence – Beyond the Docs series posts here.
About Recast Software
1 in 3 organizations using Microsoft Configuration Manager rely on Right Click Tools to surface vulnerabilities and remediate quicker than ever before.
Download Free Tools
Request Pricing