SCCM 2012 Cache & Persistent Cache - Delete System Wide

jaya31 used Ask the Experts™
Hi All,

Our user computers are running out space and we narrowed it down to the CCM cache folder in windows that is taking up the space. Is there a script that we can run system wide to delete and clean up the space, both cache and persistent. I looked over the internet and tried a couple but nothing works. Thanks in advance for you help
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
venkatspbSenior Software Engineer

The Default cache size is 5120(MB)/5GB. Try decreasing the size of the cache. As you have already tried the would not be a correct solution.

Actually I had the same kind of problem. I read in some blog, once the Cache size limit is reached the old files or folders will be deleted automatically.
Leading Engineer

The answer is PowerShell. There are many ways to achieve this. I've used a two liner (but don't have it to hand) which works fine. However, I like Compliance settings so I'm going to go for this:

Not only will it change the size, it will give you a lovely pie chart of how many have the right cache size.

Also, if it's too big to start with that suggests your build sets it too large in the first place. When you install the CM client the default size is 5GB. You can change that with the property SCCMCacheSize=2000 (or whatever you like). Note don't make it too small or you won't be able to install some software. e.g. We have AutoCAD on site and the cache needs to be at least 10GB just to be able to install it.



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial