Increasing the size of the SCCM Client Cache during Operating System Deployment

Sometimes, when you have large applications to deploy during an Operating System Deployment task sequence, it will fail because the size of the SCCM Client Cache is not big enough to cache the application installation files. By default, the SCCM Client Cache is set to 5120MB unless you specify a different value when installing the client using the SMSCACHESIZE property.

You can change the size of the SCCM client cache during a deployment by using a script. I usually implement this as a “Run Command Line” task sequence step which I run immediately before the application installation task sequence steps.

Here is the script, together with details of how to configure it:

strCacheSize = 10240
Set oUIResource = CreateObject("UIResource.UIResourceMgr")
Set cacheinfo = oUIResource.GetCacheInfo
cacheinfo.TotalSize = strCacheSize

1. Save the above script as smscachesize.vbs and amend the strCacheSize value as appropriate.
2. Place the script in a directory that can be used as a package source folder.
3. Create a package without a program and use the directory created above as the source folder.
4. Distribute the package to the appropriate distribution points.
5. In the task sequence, after the “Setup Windows and Configuration Manager” step, but before the steps that will install the applications, add a “Run Command Line” step.
6. Configure the “Run Command Line” step to execute the script using the following command line: “cscript.exe smscachesize.vbs”, and reference the package you created above.
7. Perform a test deployment before making the changes to your live deployment task sequence.

If you wish, you can of course add another step after the applications have been installed to set the cache back to the default value of 5120MB.

I’ve only ever used this script with System Center 2012 Configuration Manager, but it should also work with Configuration Manager 2007.