Nested Task Sequence Mapper

, , , , ,
Patch Current WIM Files

I’ve been looking for a simple way to identify and map out the nested task sequences.  This is the first part of a project that I’m working on.  The goal of the overall project is to duplicate an entire task sequence “suite” of the parent and all nested sequences, and then update all the nested references.

One major obstacle is the difficulty in re-pointing the “Run Task Sequence” steps to new sequences.  I’ve submitted a User Voice idea on this:

PowerShell Cmdlet for Modifying Nested Task Sequence (Get/Set-CMTSStepRunTaskSequence)

The first step of course is to be able to map out what sequences are nested where.  That is where I’ll begin.  I’ve written a small PowerShell script that prompts for a task sequence ID.  With that ID it pulls the task sequence and then enumerates all of the nested sequences down to 3 levels.

  • Parent Sequence
    • Child Sequence
      • Child Sequence
        • Child Sequence

It will display the step name, the name of the nested sequence as well as the task sequence ID.

When you run the script you’ll be prompted for a task sequence ID:

mapnestedts-1

After entering the ID the script will start mapping out the various nested child sequences.  With each one found it will then enumerate that child looking for nested sequences.

The end result looks like this:

mapnestedts-2

The script can be found on GitHub here.

Next Steps…

What I’m looking to do ultimately is to create a script that I can use to automate versioning a task sequence.  For example, I want to start a new revision of our current OSD sequence.  This script will take the current sequence, enumerate all of the nested sequences, duplicate them all with name changes, and then repoint all of the “Run Task Sequence” steps to the new sequences.

That way I don’t have to worry about possibly missing one or more doing it all by hand.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

20 − 11 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.