How to Increase SCCM Client Cache Size
In this post we will look at the steps to increase SCCM client cache size. When you have large applications to deploy during an OSD, it will fail because the size of the SCCM Client Cache is not big enough to cache the application installation files.
Software updates also use the client cache, but software updates are not restricted by the configured cache size and will always attempt to download to the cache.
You can configure the client cache settings when you install the Configuration Manager client manually. You can also do that when you use client push installation, or after the client is installed.
When you distribute software, you can set the Advanced Client to download package source files from a distribution point to a cache on the advanced client computer before the program runs.
In addition to that, you can also note that SCCM client cache location under Configuration Manager properties. When the program runs, it uses the source files in the cache instead of the source files on the distribution point.
By default, the SCCM 2012 Client Cache is set to 5120 MB and if you do not set this property while installing SCCM Client, the folder defaults to a maximum size of 5120 MB. The lowest value you can specify is 1 MB.
You could change the client cache size on a single machine by getting into Control Panel > Configuration Manager Client Properties > Cache > click on Configure Settings and change the value of cache size and click OK.
VB script to modify SCCM client cache size
Use the below VB script to increase SCCM client cache size.
On Error Resume Next Dim UIResManager Dim Cache Dim CacheSize CacheSize=20000 Set UIResManager = createobject("UIResource.UIResourceMgr") Set Cache=UIResManager.GetCacheInfo() Cache.TotalSize=CacheSize
PowerShell script to modify SCCM client cache size
Use the below PowerShell script to increase SCCM client cache size.
$Cache = Get-WmiObject -Namespace 'ROOTCCMSoftMgmtAgent' -Class CacheConfig $Cache.Size = '10240' $Cache.Put() Restart-Service -Name CcmExec The downloads links are listed below.
You can download the VB and PowerShell script by clicking on above links.
If you want to modify SCCM client cache size on multiple computers then you could deploy the script as a package to a device collection.
How to increase SCCM client cache size
Here are the steps to increase SCCM client cache size.
- Launch the Configuration Manger console.
- Click on Software Library and click on Application Management.
- Right click on Packages and click on Create Package.
Provide the Name, Description for this package. You need to specify the location where you have stored the script files so your Source folder should be the path where the script is located. Click Next.
We will be using the VB script to the change the cache size, provide details for the standard program as shown in the below screenshot. cc.vbs is the name of the script file. Click Next and complete the wizard.
Before you deploy the package you need to distribute the package to the distribution point. So right click package and click Distribute Content.
Ensure the you select the distribution point in next step. Deploy the package to a device collection, right click the package and click Deploy.
Choose the collection for which you want to deploy this package and click Next.
Set the Purpose to Available or Required. In this example I am setting it to Available. Click Next and complete the remaining steps by clicking Next.
On the client machine open the Software Center and select the package and click Install Selected.
Open the execmgr.log file on the client machine to see more details on the program execution.
We have successfully changed client cache size.
Does anyone else have an issue with the cache size not reflecting the Client Settings if you previously ran a vbs script to adjust the cache size? I use the vbs script to increase the cache size during initial OSD to accommodate a large program that gets installed. Long-term I don’t want to keep the cache size that large and want it to reflect the cache set in the Client Settings pointed at it. But it seems to take the size from the vbs script as superseding the Client Settings. Any attempts to modify the client’s cache size never gets handed down to the computer if that computer ran the vbs script during intial setup. It’s stuck at the cache set with the vbs script.
I can deploy another vbs script to size it back down, but I’d rather use the Client Settings pointed at the collection the machine is in.
Hello Prajwal.
I follow up all steps and I got this error: Policy deleted for advertisement EZ120048 package EZ1000F5 program Script
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID=”EZ1000F5″,ProgramID=”Script”, actionType 45l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l
I have looking for solutions and looks like I have to try with PS script ?!
I’ll appreciate it if you can help.
Powershellscript above had an issue with the WMI-Path but this would also work:
[__comobject]$CCMComObject = New-Object -ComObject ‘UIResource.UIResourceMgr’## Get the CacheElementIDs to delete
$cache = $CCMComObject.GetCacheInfo()
$Cache.totalsize = 20480
Don’t forget one can also set this in the client push installation properties SMSCACHESIZE=20000
Very Useful Post
Thank you for putting these walk throughs together. Very charitable!
Hi, I have SCCM 2012 and I am trying to delete CCMCACHE from control panel but it is not getting deleted, any fix for this?
I’m guessing this isn’t possible to do during a task sequence as restarting the SCCM exec service probably isn’t a good idea during that process? Tried adding this package install to my task sequence but it failed out.
You shouldn’t need to script this nowadays. Changing client cache size is now an option in Client Settings.
Hi my friend, i have a issue with my environment. I’m deploying an application to my entire ambient, around 2k machines, it’s not a big application, but, the deployment have been taking weeks and isn’t over yet. I don’t know what to do, are you able to help me?
@revV – May I know what app is that ?. Have you deployed the app as available or required ?.
Sure, it’s the Cisco jabber, an IM app. I deployed it as “Required”. Thank you for the reply my friend, i expect you can help me.
Hello Prajwal, thank you for your reply and your generosity. How should i proceed in this ticket? I mean, do i have to explain a little about my issue? I’m not sure how to do it. Because, actually, isn’t a problem, it’s just a necessarity, i need to speed up that deployment.
Is possible to have a script to auto clear the sccm cache when a certain application is installed??
I doubt if that is possible. When you deploy a package, you have an option to deploy/run another program first.
Thanks for this. I had used a VBscript a while ago to do this, but it required a lot of digging on forums, etc. I found that I had made a huge error in storing my programs for deployment and it increased the sizing of many programs/deployments a 1000x fold. Now that I fixed it, I have removed the script and everything is solid!
What would having a client cache set to Zero do? Mine is set to Zero and I can’t change it, but I notice a lot of APP’s fail.
@Steve – As mentioned in the post “The lowest value you can specify is 1 MB”. If you have set it to 0 then app’s won’t get installed. Why is that you cannot change the cache size to another value ?
The option is grayed out. I tried running your script on my local machine (and I do have admin rights) but it did not make the change.Also no errors. It looks like it runs just doesn’t do anything.
@Steve – Reinstall the SCCM client and try.