Change System Center Configuration Manager Client Cache Size with PowerShell
Applies to: Windows PowerShell 3.0+
The only way to set the Configuration Manager client cache size is by specifying it at installation. This was troublesome for me as I left it the default 5GB at install, but then was requested to deploy some AutoDesk packages that where of course over that 5GB limit. Knowing I could not rely on the end user to change their cache size, I knew I had to find a better solution.
I was directed to HeLaw’s blog, a Microsoft employee who had the answers I was looking for. I took the code he wrote and placed it into and advanced function as you see below. The function will be great for one off computers, but not for a mass deployment. Which is why you’ll see several sections of code, one will cover the mass deploy scenario.
HeLaw’s blog post deploys this with a compliance baseline in Configuration Manager, I agree something like this should be done as a compliance baseline. However, to be honest he lost me when he started talking about doing it so I created an application to deploy. Accomplishes the same goal and has reporting. The easiest way I’ve found to deploy PowerShell code to clients is by using PowerShell Application Deployment Toolkit. What it does in a nutshell is allow you to write or use a PowerShell script to feed a .exe that will execute the PowerShell script. Since we’re deploying this as an application we’ll need a detection method, which is listed below as well.