Update CCMCache Size via PowerShell

Super short post, just more for self-documenting.

I found tons of scripts out there to do this, but they all required having to reset ccmexec before the cache size updates.  So… if you do it from the control panel, you don’t have to reset the service…  what were those scripts doing wrong, that the control panel was doing right?  Mike Terrill told me… the Control Panel uses the COM object, so lets just do that with Powershell!

Super Simple (1 Line!)
Sure you can break it out into more lines if you’re going to make a script to make it more “read-able”, but I like 1 liners.

in PowerShell:
New-Object -ComObject UIResource.UIResourceMgr).GetCacheInfo().Totalsize = "25000"

In Task Sequence Run Command Line Step:

powershell.exe -command "New-Object -ComObject UIResource.UIResourceMgr).GetCacheInfo().Totalsize = ""25000"""

Originally Posted on GARYTOWN.COM

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.