Configure SCCM Task sequence Pre-Cache Content – Part 1 Configuration Manager ConfigMgr

Configure SCCM Task sequence Pre-Cache Content – Part 1. For Bulk application changes or Operating system upgrades, we use task sequence. The user starts the Task sequence from SCCM Software center and waits for content download.

This delay always impacts the end-user self-service experience with the SCCM software center. Microsoft’s solution to this is “SCCM Task sequence Pre-Cache Content”.

This feature is available starting with SCCM CB 1702. With the Task sequence Pre-Caching feature enabled, installation completes faster. Because contents required for the installation are already cached on the local hard disk.

This is a series of posts as listed below:

  1. How to Configure SCCM Task sequence Pre-Cache Content Part 1
  2. Reporting of SCCM Task sequence Pre-Cache Content – Part 2

Benefits with SCCM Task sequence Pre-Cache Content:

  • 1 – Reduce Task sequence run time.
  • 2 – Allows you to pre-cache SCCM package contents during off business hours.

We can schedule deployment as available during the night and allow at least 4 hr for the pre-caching process to complete.

Patch My PC

Note 1: Task sequence Pre-Caching feature works only for deployments configured as “available”.  Note 2: Pre-Caching feature starts caching contents once deployment available start date/time reach.

How to Enable SCCM Task sequence Pre-Cache Content?

 Follow the below steps to enable the feature.

  • Navigate to Administration > Updates and Servicing > “Features” node of the console. Right-click on “Task Sequence content Pre-Caching feature”.
  • Select “Turn On”. Confirm by selecting “Yes”. If the Turn On option is not enabled on your console then, you need to enable “Consent to use Pre-Release features
Configure SCCM Task sequence Pre-Cache Content - Part 1
Configure SCCM Task sequence Pre-Cache Content – Part 1
  • After enabling the Feature and this change replicate to all site hierarchy servers. You can verify smsdbmon.log.
  • CM_UpdateFeaturesStatus” SQL table updated.
Modified trigger definition for Hierarchy Manager (CFD)[CM_UpdateFeaturesStatus_INS_UPD_HMAN]: table CM_UpdateFeaturesStatus(FeatureGuid) on insert,update, file CMF in dir C:\Program Files\Microsoft Configuration Manager\inboxes\hman.box\CFD\
CM_UpdateFeaturesStatus
Configure SCCM Task sequence Pre-Cache Content – Part 1 1

After installing the feature, re-open the SCCM console. Right-click Task sequence deployment and select properties.

Configure SCCM Task sequence Pre-Cache Content - Part 1 2
Configure SCCM Task sequence Pre-Cache Content – Part 1 2

Enable check box “Pre-download content for this tasks sequence”.

Configure SCCM Task sequence Pre-Cache Content - Part 1 3
Configure SCCM Task sequence Pre-Cache Content – Part 1 3

Key notes:

The pre-cache feature downloads all package contents referenced in the task sequence with an exception for the OS upgrade step. We will talk about this exception later part of the post.

For example, The task sequence has 10 different driver packages to handle 10 hardware models. Each task sequence step is configured to install the driver based on hardware model condition.

Pre-cache feature downloads all driver packages even though all driver packages are not applicable to the system. Because the condition configured in each task sequence step gets evaluated only at run time.

Conditional pre-download is available only for the OS upgrade step. Pre-cache feature downloads OS upgrade package only if the below condition is true.

The condition can be based on 2 values (architectures and language ) at the time of writing this post. In future SCCM releases, we can expect more supported conditions for the Task sequence pre-cache feature.

GitHub Link to get WMI query Task-sequence-Pre-Cache/WMI Query.sql at main · AnoopCNair/Task-sequence-Pre-Cache (github.com)

Pre-download WMI Condition Example Configure SCCM Task sequence Pre-Cache Content - Part 1 4
Configure SCCM Task sequence Pre-Cache Content – Part 1 4

If the User starts the TS before all contents are pre-cached. TS will not wait for all contents to pre-cache. TS will fall back to any of the 2 deployment options configured in your deployment as shown below.

So, it’s important to allow at least 5 hr. for all the contents to get pre-cached once the Task sequence is available for the user.

deployment option Configure SCCM Task sequence Pre-Cache Content - Part 1 5
Configure SCCM Task sequence Pre-Cache Content – Part 1 5

How does SCCM Task sequence Pre-Cache Content work?

Lets analyze SCCM client component workflow to pre-cache content by following logs.

  • Verify policyagent.log to confirm whether the deployment policy was received by the computer.
  • Search task sequence deployment ID in policyagent.log
Download of policy CCM_Policy_Policy5.PolicyID="DEP-CHQ20001-CHQ00001-6F6BCC28",PolicySource="SMS:CHQ",PolicyVersion="1.00" completed DTS Job ID:{91696C9D-FB85-4BD8-B163-E20475B3C8F7}
policyagent.log Configure SCCM Task sequence Pre-Cache Content - Part 1 6
Configure SCCM Task sequence Pre-Cache Content – Part 1 6

Review the log datatransferservice.log to confirm DTS Job completion.

datatransferservice.log Configure SCCM Task sequence Pre-Cache Content - Part 1 7
Configure SCCM Task sequence Pre-Cache Content – Part 1 7

Once the above DTS job completes then the Content access service(CAS) starts requesting to pre cache package contents.

Content access service(CAS) verifies whether the SCCM cache has enough space to accommodate the package download. SCCM client cache size should be able to accommodate the content.

Received request for content CH000001.1, size(KB) 121237, under context System with priority Low. ContentAccess 1/11/2018 1:08:51 PM
CacheManager: There are currently 0 bytes used for cached content items (1 total, 0 active, 1 tombstoned, 0 expired). ContentAccess 1/11/20181:08:51 PM
CacheManager: Grooming cache, target free space size is 124146688 bytes, allow deletion of active items = 'FALSE'... ContentAccess 1/11/20181:08:51 PM
CacheManager: There are currently 0 bytes used for cached content items (1 total, 0 active, 1 tombstoned, 0 expired). ContentAccess 1/11/20181:08:51 PM
CacheManager: Goal free space size for groom operation is 124146688 bytes. cache already has 5368709120 bytes
Content access service (CAS) Configure SCCM Task sequence Pre-Cache Content - Part 1 8
Configure SCCM Task sequence Pre-Cache Content – Part 1 8

The location services component will request for Distribution point list. You can verify this activity in locationservices.log. LocationServices component provided the Distribution point list for each package.

Distribution Point:'http://CM1.corp.contoso.com/SMS_DP_SMSPKGS/CHQOOOOS', Locality...
Calling back with the following distribution points
Distribution Point='http://CM1.corp.contoso.com/SMS_DP_SMSPKGS/CHQDOOOB‘, Locality...
Calling back with locations for location request {0C09FC2C-E964-4F79-87AA-6CE6816FA782}
Calling back with locations for location request {EBZ8A68C-C80D-4817-9A21 -EB4EC017C1 53}
Content access service (CAS.log) Configure SCCM Task sequence Pre-Cache Content - Part 1 9
Configure SCCM Task sequence Pre-Cache Content – Part 1 9

ContentTranferManger component will start downloading the contents from the Distribution points list as shown below. Monitor ContentTransferManger.log to track CTM job status.

CTM job {78BC2A66-C473-4AED-8D86-ZD37D89FDAD9} entered phase CCM_DOWNLOADSTATUS_PREPARING_DOWNLOAD
CTM job {CC8C1 B1 F- E322-4C36-8ABD-9AE51 6FBDEC} entered phase CCM_DOWNLOADSTATUS_PREPARING_DOWNLOAD
CTM job {783C2A66-C473-4AED-8D86-2D37D89FDAD9} entered phase CCM_DOWNLOADSTATUS_DOWNLOADING_DATA
CTMjob {CC8C1 B1 F-E322-4C36-8ABD-9AE516F8D1EC} entered phase CCM_DOWNLOADSTATS_DOWNLOADING_DATA
CTM job {FFBDBOZD-5E70-4F7E-947F-C9ASF2A95019} entered phase CCM_DOWNLOADSTATUS_REPARING_DOWNLOAD
CTMjob {FFBDBOZD-5E70-4F7E-947F-C9A5F2A95019} entered phase CCM_DOWNLOADSTATUS_DOWNLOADING_DATA
CTM job {4BC9808F-1ACF-4AE8-A73C-B9FBOS1 AED9E} successfully processed download completion.
CTM job {788C2A66-C47B-4AED-8D86-2D37D89FDAD9} successfully processed download completion.
CTM job {CC8C1 B1 F-E322-4C36-8ABD-9AE516F8D1EC} successfully processed download completion.
CTM job {FFBDBOZD-5E70-4F7E-947F-C9A5F2A95019} successfully processed download completion.
ContentTransferManger.log
Configure SCCM Task sequence Pre-Cache Content – Part 1 10

You can keep an eye on datatransfer.log in parallel. You can see the HTTP URL’s accessed by the ContenTranferManager to download each files in the package from the Distribution Point.

UpdateURLWithTransportSettings():NEWURL-http:/cm 1.corp.contoso.com:80/SMS_DP_SMSPKGS/CHQ00002/sccm?/scepinstall.exe
UpdateURLWithTransportSettings():OLDURL-http://cm1 .corp.contoso.com/SMS_DP_SMSPKG$/CHQ00002/sccm?/wimgapi.msi
UpdateURLWithTransportSettings():NEWURLhttp://cm 1.corp.contoso.com:80/SMS_DP_SMSPKG$/CHQ00002/seem?/wimgapi.msi
UpdateURLWithTransportSettings():OLDURL-http://cm1.corp.contoso.com/SMS_DP_SMSPKG$/CHQ00002/sccm?/x64
UpdateURLWithTransportSettingsQ:NEWURL-http://cm 1.corp.contoso.com:80/SMS_DP_SMSPKG$/CHQ00002/sccm?/x64
datatransfer.log Configure SCCM Task sequence Pre-Cache Content - Part 1 12
Configure SCCM Task sequence Pre-Cache Content – Part 1 12
  • DataTransferManager marked as complete.
  • Content transfer manager (CTM job ) marked as complete
  • Finally, CAS verifies the Hash value for the downloaded package.
DTSJob {825979A2-ADD1-4A6A-A75ACFFSF91FC) in state 'Retrieved Data'.
DTSJob {82597'1A2-ADD 1-4A6A-A546-75ACFFlfF91FC} successfully completed download.
DTSJob {825979A2-ADD·1-4A6A-A 75ACFf BF91 FC} in state 'NotifiedComplete'.
CTMJob {CC8C1B1F-E322-4C36-8ABD-9AE516F8D1EC} successfully processed download completion.
DTSjob {B25979A2-ADD1-4AeA-A545-7SACFF8F91FC} has completed:Status :SUCCESS
Download completed for content CHQ00002 under context System
Hash verification succeeded for content CHQ00002.2 C\Windows\ccmache\3 
CacheManager: ADD new caehe entry for id:CHQ00002 Version :2 Size :217159K RefCount:l LartRef Minutes : 0
CAS.log Hash value verification

Result for SCCM Administrator:

4 Packages cached which are referenced in the task sequence as shown below. The user is yet to start the Task sequence from the Software center.

Pre-cached task sequence
Configure SCCM Task sequence Pre-Cache Content – Part 1 14

At the time of writing this post, there is no SCCM native feature to find Task sequence pre-caching status. In my second blog post 2 we will see how to achieve this.

Author

Vimal has more than ten years of experience in SCCM device management solutions. His main focus is on Device Management technologies like Microsoft Intune, ConfigMgr (SCCM), OS Deployment, and Patch Management. He writes about the technologies like SCCM, Windows 10, Microsoft Intune, and MDT.

11 thoughts on “Configure SCCM Task sequence Pre-Cache Content – Part 1 Configuration Manager ConfigMgr”

  1. Hi, thanks for the post. It is great article!
    I was really surprised that all packages already presented in th ccmcache folder. It is really nice.
    I have a question:
    If package already presented in the cache folder, I`ve changed one of them .Is package going to be updated before installing?

    Reply
    • I didnt tested that scenario.
      But i think it will download again.Each SCCM Package have a hash value associated.SCCM client will download new content if it observe any mismatch with the cached content and the actual source.

      Reply
  2. Hello Vimal
    Thank you for sharing valuable post.
    I have doubt about Pre-download WMI Condition,
    I think condition for download is not checked in Task Sequence condition as you mentioned above.
    For example :- (Select * from Win32_OperatingSystem where Locale = ‘0409’ and OSArchitecture = ’32-bit’)

    for conditional download required Package ==> Data Source tab for matching criteria on the OS Architecture/Language

    Could you please confirm?

    Reply
  3. Hi Vimal,
    thanks for this very helpful post.
    I’m experiencing strange results during my tests with SCCM 1906:
    Sometimes a client starts downloading right after receiving the advertisement, sometimes it justs sits there for hours and doesn’t start downloading at all (nothing in ContentTransferManager.log).
    The TS advertisement is shown in Software Center. Did you ever experience something like this?
    Any ideas where to look?

    Reply
  4. Thanks for a very informative post, I had a couple of question to follow.
    1. Will this content download with ADAPTIVA for content download?
    2. If the TS is deployed with content pre-caching, will this only be available after the content is downloaded or asap after deployment?

    Reply
  5. Hello Vimal,

    We are trying pre cache option and we have deployed task sequence to collection, till here it is fine and users are installing it,

    Now when we deploy to the collection and user receives policy and he will get popup “New Software available ” here users are checking in the software center and they are going and starting the task sequence without content gets downloaded

    We are trying to suppress that “new software available” popup until all the task sequence content gets downloaded and once the content is downloaded users need to get that popup,

    Please let us know if we can achieve this scenario

    Reply
  6. In reply to Uday Kumar, too late for him but possibly someone else will read. There may be another option but how I addressed this was to create two deployments.

    Deployment one with all notices suppressed and also suppressed in the TS options. this deployment will silently download the content as is just a copy of the task sequence.

    Deployment two is sent with the expected deployment options to allow messages etc. and display in software center.

    You can use the cache reporting to know when you can send deployment two to the pre-cached computers.

    Reply

Leave a Comment

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