The Approach
- Create a new Configuration Item under Assets and Compliance > Compliance Settings > Configuration Items, targeting Windows devices.
- Add a setting of type Script, with a PowerShell discovery script that enumerates the CCMCache elements (via the
UIResource.UIResourceMgrCOM object’sGetCacheInfo()method) and checks each element’s last-referenced date against your threshold. - Add a matching remediation script that removes cache elements older than the threshold using the same COM object’s
DeleteCacheElement()method. - Set the compliance rule to remediate non-compliant clients automatically, then deploy the baseline to a collection with a recurring evaluation schedule.
A Small Terminology Note, Plus Where Things Stand in 2026
One correction worth making: the original refers to end users installing software from your “Software Catalog” — the current official name for that self-service portal is Software Center, not Software Catalog (the latter is outdated terminology, easily confused with the long-retired web-based Application Catalog role from older ConfigMgr versions). On the substance: the Compliance Settings-based CCMCache cleanup approach described above is unchanged and still works identically on the current Configuration Manager release (2603) — theUIResource.UIResourceMgr COM object and its GetCacheInfo()/DeleteCacheElement() methods remain the standard scripting interface for this.
Resources
Gear We Recommend
Testing configs is easier with a dedicated admin machine set up right. Here’s the kit we use.
Browse our Windows Admin Toolkit picks on AmazonAs an Amazon Associate, TechyGeeksHome earns from qualifying purchases.
Discover more from TechyGeeksHome
Subscribe to get the latest posts sent to your email.