From time to time users have approached me with an error, that the SCCM deployment was failing due to the client cache being too small. For all new deployments I have made sure that this does not happen by updating the Client Installation properties string but for all the current machines I have addressed this in 2 ways. For the immediate client I am remediating, I use the script displayed below which I save as a Powershell file by the name of update_cache.ps1.

The contents are:

$Cache = Get-WmiObject -Namespace 'ROOT\CCM\SoftMgmtAgent' -Class CacheConfig
$Cache.Size = '10240'
Restart-Service -Name CcmExec

The local command to be executed on the local client is:

Powershell.exe -executionpolicy bypass -File updatecache.ps1

Post this I realized, since there may be more users that may face this issue, I created a SCCM package using the update_cache.ps1 and deployed it to all the clients. Since than I have rarely had a client approach me that faced this issue.