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

17 thoughts on “Download package content during a task sequence”

  1. Hello Peter.

    Nice post, I’m trying to use the “Custom path” option BEFORE the “Partition and Format Disk” step to download a package with some script files in. In my scenario the disk is blank and I need to use “Custom path” to cache to X: Ramdrive.

    Do you know if this is possible? My experience from testing is that it fails if for example setting custom path to “X:\Windows\Temp”, as noted in the log file in your example “Custom Path” must first cache the package to fixed drive(C:) and then copies it to the custom location.

    Can you think of a workaround to solve this in some other way?

    Thanks.

    Reply
  2. Ok, after reading the tech net article you linked to, it clearly states that this step is not working in WinPE, I guess that settles it then, this is not for my scenario unfortunately.

    Reply
  3. Do you know if its possible to point to the top level folder via the variable?
    i.e. I create a task to stage multiple driver packages to C:\Drivers & set the variable %Drivers%; then in the OS Upgrade step can I tell it to use %Drivers% for staged content? (Otherwise I can only specific the variable pointing to 1 driver package)

    Reply
  4. It would be only what’s required; we have a common driver package that all devices require (e.g. USB Ethernet adapters & USB docks) so they can plug in at multiple desks etc… Plus the drivers for the laptop mode itself.

    Rather than add the common drivers to each ‘model’ package; it’s easier to have them split out to a single package that can be used with each deployment.

    I ended up just hardcoding the c:\drivers path into the task sequence rather than using the variable.

    Reply
  5. Please note that there’s a bug in Download Package Content. Whenever the deployment (advertisement) is set to “Access content directly from a distribution point when needed by the running task sequence”, the step will fail. This is described here: .
    I can confirm this still is a problem in ConfigMgr 1702.

    Reply
  6. Seems url has been removed from my post, here’s a part of the url: social.technet.microsoft.com/Forums/office/en-US/dd4a5841-77e6-442a-b537-019f1e946a0c/problem-using-download-package-content-task?forum=ConfigMgrCBOSD

    Reply
    • Thank you, Herman. To be exact, according to that post, it’s not a bug in the product but in the docs. You should not use this in combination with the setting “Access content directly from a distribution point when needed by the running task sequence

      Reply
  7. Hey Peter, wonderful post! But I’m unable to browse a ‘Operating System Upgrade Package’ or an Image file in ‘Download Package Content’ step. Is there a limitation that we can choose only normal packages? I have Config Man 1610

    Reply
  8. Hi Peter, Thanks! for this post.
    I am facing a weird issue where this step (download package content) is failing with standalone task sequence media, while its working fine when running the task sequence over network.

    Do you know if this is some kind of bug? We are on ConfigMgr 2002.

    In SMSTS log I am getting below error while downloading
    Management Point name must be set in an environment variable OSDDownloadContent 29/01/2021 09:49:37 7992 (0x1F38)
    PrepareTransport() failed. 0x80004005. OSDDownloadContent 29/01/2021 09:49:37 7992 (0x1F38)
    TS::Utility::PrepareTransport(oHttpTransport), HRESULT=80004005 (..\resolvesource.cpp,5014) OSDDownloadContent 29/01/2021 09:49:37 7992 (0x1F38)
    Failed to download content for SMS package xxx009CC, hr=0x80004005 OSDDownloadContent 29/01/2021 09:49:37 7992 (0x1F38)
    Failed to get for CCM cache the source for Package: xxx009CC, hr=0x80004005 OSDDownloadContent 29/01/2021 09:49:37 7992 (0x1F38)
    Failed to download package KO1009CC, continuing to download next package OSDDownloadContent 29/01/2021 09:49:37 7992 (0x1F38)

    Reply
  9. Please ignore my question as I found the MS article confirming that it is not supported with standalone media.

    Reply
  10. I’m trying to download package with save to variable contentpath – that is successful

    my next step is to run a powershell and I need to reference that variable and I can’t seem to find anyway to do that. Can you point me in the righ tdirections?

    Reply

Leave a Reply to Avanish Srivastava Cancel reply

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