Download package content during a task sequence

This week a blog post about one of the smaller new features of ConfigMgr 1511 and later. I want to devote this post to the new ability to easily download the content of a package during a task sequence. This ability is mainly introduced to work with the Windows 10 upgrade scenarios and the WinPE peer cache functionality. However, it can also be used to replace all the Run Command Line task sequence steps that were used to copy the content of normal Packages during a task sequence. In this post I’ll go through the different configuration options of that new ability, the Download Package Content task sequence step. I will also show an example in a task sequence and I will end with a look at the results in the smsts.log.

Configuration options

The Download Package Content task sequence step can download the content of Boot Images, Operating System Images, Operating System Upgrade Packages, Driver Packages and Packages. It also has the very nice option of Save path as variable, which can be used to easily store the location of the downloaded package content. When a variable is configured it has to be referred to in subsequence steps with a numerical suffix. That means that when ContentPath is used, as variable, it has to be referred to like ContentPath01. The order in the list determines the numerical suffix that’s used as reference.

Task Sequence working directory

The download location Task sequence working directory can be used at any moment after the Format and Partition Disk task sequence step. After that step the content will be kept and moved during the running time of the task sequence. The variable configured with Save path as variable will be updated when the location of the downloaded content has changed.

Configuration Manager client cache

The download location Configuration Manager client cache can be used at any moment after the Setup Windows and ConfigMgr task sequence step. When the ConfigMgr client is up-and-running, the content can be downloaded to its cache. The content will be available even after the task sequence is finished. This allows the client to act as a peer cache source for other peer cache clients. The variable configured with Save path as variable will be updated when the location of the downloaded content has changed.

Custom path

The download location Custom path can be used at any moment in the task sequence. However, keep in mind that the content will not be moved during the running time of the task sequence. Only the changes to the driver letter, due to reboots, will be updated in the variable configured with the Save path as variable. The content itself will be left untouched. When this option is used after the Setup Windows and ConfigMgr task sequence step, the content will be available after the task sequence is finished.

Task Sequence example

Now that the configuration options are clear, let’s go through a configuration example. That example will mainly show how to use the configured variable.

1 DownloadPackageContentThe first action is to download the content and to configure the download-to location. This can be achieved by selecting a number of packages, of the previously mentioned types, and by specifying the download-to location. To make accessing the content easier, select Sava path as a variable and use ContentPath as variable.
2 DownloadPackageUsageThe second action is to use the content after it is downloaded. This can be achieved by using a Run Command Line step and using the ContentPath02 variable. That will refer to the downloaded content of the Set Image Version Package. Now simply refer to anything available within that Package.

Important: After saving the task sequence by clicking OK or Apply the list with packages will be rearranged by the letters of the alphabet. This will impact the numerical suffix that is needed to point to the right location. My advise is to save the task sequence before referring to the content.

Result

After going through all the configuration options and the task sequence example, it’s time to look at some results. Let’s have a look at how the first Package is handled by the OSDDownloadContent component, in the smsts.log, for the three different download locations.

Task sequence working directory

The download location Task sequence working directory is the easiest to handle for the task sequence. The task sequence will download the content to the C:\_SMSTaskSequence\Packages directory and set the ContentPath01 variable to the location of the first Package. After that it will add the ContentPath01 variable to the list of paths that need to be remapped on reboot.

petervanderwoude.nl

Configuration Manager client cache

The download location Configuration Manager client cache requires a few additional actions. The task sequence will download the content to the C:\_SMSTaskSequence\Packages directory. After that it will stage the downloaded content to the client cache directory and set the ContentPath01 variable to the location of the first Package in the client cache. After that it will add the ContentPath01 variable to the list of paths that need to be remapped on reboot.

SMSTS_CCMCache

Custom path

The download location Custom path requires similar additional actions. The task sequence will download the content to the C:\_SMSTaskSequence\Packages directory. After that it will stage the downloaded content to, in this case, the C:\Temp folder and set the ContentPath01 variable to the location of the first Package in that folder. After that it will add the ContentPath01 variable to the list of paths that need to be remapped on reboot.

SMSTS_CTemp

More information

For more information about this new task sequence step, please refer to the following article: https://technet.microsoft.com/en-us/library/mt629396.aspx#BKMK_DownloadPackageContent