Using the Task Sequence Documentor v2 with PowerShell

Like many organizations out there, we have had a need to document our ConfigMgr 2012 task sequences. There are a few ways to do this, but I prefer the Task Sequence Documentor v2.

This is a very simple tool that uses the task sequence XML and a formatting xsl file to display a HTML page in Internet Explorer. Throw a nice PowerShell wrapper around it and you have an automated documentation method!

Kudos to The Deployment Guys for putting this together, and Benjamin McConnell and Chrispy in the comments section for the PowerShell reference!

The xsl file

By default, the xsl file gives you a nice old 90’s style format.


I am no web design expert, but I do like to segregate the child items with a border.

Just edit line 30 and 36 to add a little border. Add the border-color and set border=’1′.

This gives a little better output. Feel free to edit as necessary to tailor to your needs.



The script

  • Must have the ConfigMgr 2012 Console installed
  • Must run with PowerShell x86
  • Must run with PowerShell 3.0+
  • Must have¬†tsDocumentorv2.xsl in the script root
  • Lines to edit
    • Line 1 – $sitecode – ConfigMgr site code
    • Line 4 – $tsbackup – Path to backup to
    • Line 41 –¬†Export-TaskSequences -filter “*TaskSequenceNameHere*”
  • Saves xml and xsl file to Backup_MMDDYYYY_HHMMSS

This script is a little rough around the edges, but it can be ran on a schedule to backup the task sequences you need.

Running it!

To view the documented task sequence you need to open the exported XML in Internet Explorer. When you open it, you will get prompted. The prompt is different for each version of IE, but on IE11 you get this.




13 thoughts on “Using the Task Sequence Documentor v2 with PowerShell

  1. Being able to document Task Sequences is a handy thing, but doing it manually is incredibly tedious, error prone, and likely to miss details.

  2. Mike Compton

    This is excellent!!


  3. Mike Compton

    Me again.

    It appears that the script will fail with any task sequences that have a forward slash (/) in name. I presume there are a number of characters which will do like wise:

    @ ” * ? \ / | : )

    Don’t suppose you want to amend you script to ignore those, or replace with an underscore or something?

    • Yeah that shouldn’t be too hard Mike, keep an eye out for an update

  4. George

    Hello Daniel

    Thanks a lor for your work.
    I would like to ask you, I don’t understand very well how I can send to Task Sequense my variables, is it possible send it from the same script?

  5. Dan

    Brilliant mate… thanks !

  6. Michael Horton

    I’ve been using this method for years but with the ability to run a task sequence from within a task sequence the child task sequence steps aren’t being or even being referenced. Any ideas?

    • Ah, unfortunately this method only parses the XML of the task sequence you are targeting.

      The good news is I have a presentation in May at MMS 2020 about using the native PowerShell cmdlets to document your task sequences. It will include nested task sequences!

      • Glen

        Can you share the source?

        • Due to COVID-19, MMS was rescheduled for late July. Will post some updates after that time.

          • Bob Parker

            Did this ever get published?

  7. Bob Parker

    The XSL link is dead, do you have an updated link, or code for the XSL?

Leave a Reply

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

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url=""> 

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