Setting SMSCacheSize in SCCM 2012 task sequence does not work

There are a lot of threads discussing the SMSCACHESIZE and how to configure this. The issue is that configuring the SMSCACHESIZE in the task sequence doesn’t work. The issue we had is that no matter what size is configured using the parameter in the task sequence it always set the client’s cache size to the default, which is 5120 MB.

After checking the product documentation about the SMSCACHESIZE property we found:
“This setting is ignored when you upgrade an existing client and when the client downloads software updates.”
Because we included the SCCM 2012 client in the image (build & capture), Microsoft calls this an upgrade of the client.

Change the task sequence by adding a VBS script to change the SMSCacheSize after the installation as described below:
– Save the script below in a .VBS file and place it on a reachable location (for instances on shared folder on the distribution points)

Dim ClientResource
Set objShell = WScript.CreateObject ("")
Set ClientResource = CreateObject("UIResource.UIResourceMgr")
Set CacheInfo = ClientResource.GetCacheInfo
CacheInfo.TotalSize = 7680 ' Your new cache size in MB.

– Go to Software Library, Packages and choose Create Package
Give the package a name like Set SCCM Cache Size, choose a source folder like \\SCCM-NLD-DP\sources$\Software\Packages\SCCM_2012\SCCMCacheSize
Choose Next and choose the option Do not create a program, Next and finish
– Open the Task sequence, After the SCCM setup add a Run Command Line
Task Sequence SMSCacheSize
– Add the following line to the Command Line: cscript.exe //nologo \\SCCM-NLD-DP\sources$\Software\Packages\SCCM_2012\SCCMCacheSize\setcache.vbs

Problem fixed !