The Deployment Guys

Helping to deploy your world automagically...

Porting Configuration Manager Task Sequences to a Different Environment

Porting Configuration Manager Task Sequences to a Different Environment

  • Comments 1
  • Likes

Many scenarios arise in which you may want to port your task sequence from one environment to another. Common scenarios include promotion through Lab and QA environments and migration between disconnected hierarchies.  Configuration Manager allows you to export task sequences into XML files as an out-of-the-box feature, however there are some things to remember when doing this.

Here is a checklist I like to follow:

1. Passwords: The exported task sequence will replace passwords in the task sequence for known steps before performing an export to ensure no clear-text passwords exist in the XML. This means any passwords in the "Apply Windows Settings" and "Join Domain" steps will replaced with ????????  . Remember to re-enter passwords when importing the task sequence or it will be set to 8 consecutive question marks.

2. Product Keys: Any product keys you enter will be blanked out in the "Apply Windows Settings" step. Remember to re-enter these for your XP task sequences.

3. Package IDs*: If the new Configuration Manager Site Server is not in the same hierarchy, you will have to re-associate all the steps in the task sequence to the packages in the new environment. You may also need to reassociate the boot image and any packages selected to run before the task sequence. Read below for a script to automate this process.

4. Inject Drivers in the Apply Driver Package step: If you have configured the task sequence with an Apply Driver Package step and chosen a boot-critical driver for Pre-Vista OSes, you will need to reselect this driver in the new environment.

5. Setup Windows and Config Manager step: If you are migrating to a new hierarchy, you will also want to see whether any of your Config Manager client properties need to be changed - such as reference to an FSP or SLP.

6. Domain references: You may have to also change any Join Domain steps you have in the Task Sequence to point to a new domain and use different credentials to perform the join.

7. MDT Database: If you are moving to a new hierarchy, the packageIDs  in your MDT Database will still point to packageIDs in your previous environment. I am working on a script to help automate this and will post it once it is ready.

*Steps 3 can be a tedious process and often times can result in a manual configuration error. Luckily, we've created some powershell scripts to help make the process less manual:

Automated Scripts:

ExportTSRefs.ps1 - Exports the name, packageID and version of any referenced packages of a given task sequence to a RefIDsFile. This includes OS Packages, OS Install Packages, Driver Packages, Boot Image Packages and Software Packages. Note this only exports the refIDsFile not the packages or XML themselves.

Usage:

."ExportTSRefs.ps1" -sitecode <sitecode> -refIDsFile <filename> -delim <delimiter> -tsID <taskSequencePackageID>

For Example to Export the references of the CEN00001 TaskSequence Package:

."ExportTSRefs.ps1" -sitecode "CEN" -refIDsFile "refIDs.txt" -delim "=" -tsID "CEN00001"

Running the script multiple times with different tsIDs and an existing refIDs file will append only unique packageIDs to the refIDs File.

ScrubTS.ps1 - Reads a RefIDsfile generated by the ExportTSRefs.ps1 script. It then scrubs all the Task Sequence XML files in the given folder for package IDs, looks up packages with the same name and version in the new environment and replaces the XML with the new package IDs. Note: packages in Configuration Manager and source files must already exist in the new environment.

Usage:

."ScrubTS.ps1" -sitecode <sitecode> -refIDsFile <filename> -delim <delimiter> -path <folderpath>

For Example to scrub the package IDs of all the XML files in the C:\ExportedTaskSequences folder

."ScrubTS.ps1" -sitecode "CEN" -refIDsFile "refIDs.txt" -delim "=" -path "C:\ExportedTaskSequences"

Remember the path is a folder name and the script will read all the .XML files in the folder. The new XML files will have the extension _scrubbed.XML.

For both scripts you can use any delimiter you like , I prefer "=" but feel free to experiment.

We are working on developing more scripts to add further automation around the promotion and migration process of task sequences. Stay tuned! As always try out the scripts and feel free to add any comments or contributions.

This post was contributed by Aly Shivji a consultant with Microsoft Services - U.S. East Region.

Attachment: TSPromoScripts.zip
  • This is a great start!  Please look at automating all packages for disconnected sites.  Recreating dozens of packages and then keeping them syncronised (all settings!) is one of the most time consuming and boring tasks i have to do, day to day

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment