Automagically documenting Config Manager Task Sequences

Posted: June 4, 2014 in Configuration Manager, Information
Tags: , , , , , , , ,

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

There is a process that has been around for a while now, so I figured I’d just post it here for easy reference as I keep forgetting where to find it. This process was developed for ConfigMgr 2007, but there is also a way to do it for 2012 as well.

First, the following TechNet blog post has the template you will need. Go to the bottom of the post and download the tsDocumentorv2.xsl file:

http://blogs.technet.com/b/deploymentguys/archive/2009/02/20/update-to-the-tasksequence-documentor.aspx

That post also has the instructions for doing a 2007 task sequence.

For a 2012 task sequence, there are a couple of options. One mentioned in the comments of the link above, and another from a TechNet forum question

  • One using Powershell:

Chrispy 29 Aug 2013 7:27 PM

I think I may have found an easier (and quicker) way to create the XML file.

1) Load the SCCM PowerShell module

2) Connect to your site

3) $TS = Get-CMTaskSequence -Name “<Your Task Sequence Name” | select -ExpandProperty Sequence

4) Write-Output ‘<?xml-stylesheet type=”text/xsl” href=”tsDocumentorv2.xsl”?>’ | Out-File “C:\temp\TaskSequence.xml”

5) Write-Output $TS | Out-File “C:\temp\TaskSequence.xml” -Append

6) Ensure you have a copy of the stylesheet in the same directory as your xml file

7) Open the xml file in Internet Explorer

  • And one using the consoles “export” function:

http://social.technet.microsoft.com/Forums/en-US/839bd2e2-fab5-40fd-9715-c27578ad249b/documenting-your-task-sequences-automagically-for-sccm-2012?forum=configmanagerosd

1. Export ConfigMgr 2012 Task Sequence to .zip file

2. Extract .zip file

3.Browse to SMS_TaskSequencePackage\packageid

4.Copy tsDocumentorv2.xls to this directory

5. open object.xml from SMS_TaskSequencePackage\packageid and search for “cdata”

6. copy everything between <![CDATA[ and ]]>

7. paste it into a new text file.

8. add <?xml-stylesheet type=”text/xsl” href=”tsDocumentorv2.xsl”?> to the top line

9. Save with a .xml file extension into SMS_TaskSequencePackage\packageid directory

10. Open in IE (if using IE 9 or 10, be sure to use compatibility mode.

Comments
  1. Amar says:

    Have you tried this for CM12…it either freezes for me when I export or it just takes a really long time.

    • Scott says:

      Yes, it works with 2012, there are slightly different steps as described in the blog post.
      When you do the export, are you doing it on the server or from a remote console? Also, make sure you untick the boxes for exporting the associated packages and content as you don’t need them for this.

  2. Amar says:

    I did it from a remote console, I’m guessing it needs to be done on the server. Thanks for your help.

    • Scott says:

      It can work remotely, but you have to remember that there are a lot of remote WMI calls being made, and especially make sure you aren’t exporting the packages as well.
      Doing the export on the server itself is much quicker and easier. It creates the zip file that you can then copy off to your remote workstation to do the extra steps on and then view the file with.

  3. Matt says:

    I think this option does a better job. It happens automatically when a TS is modified, and included the stylesheet info in the document.

    http://myitforum.com/cs2/blogs/maikkoster/archive/2011/05/12/versioning-monitoring-sccm-task-sequences.aspx

    • Scott says:

      That actually looks pretty cool. Thanks for the heads-up, will have to check it out.

      It hasn’t been updated for a while so will be interesting to see if it still works with R2 and with extensions like MDT etc.

      • Steve says:

        Confirmed that this works on R2 following the same procedure. 2 things that tripped me up were that you need to run on the SCCM server and my cut & paste of the xml text for line 2 the speech marks needs replacing. Otherwise top banana!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: