web analytics


How to delete Configuration Manager Client cache item

Posted by:

To delete Configuration Manager Client Cache item

  1. Create UIResource.UIResourceMgr Com Object
  2. Identify Cache Element ID number
  3. Use the DeleteCacheElement method


About the Author:

Kaido Järvemets is a developer, consultant, trainer specializing in Microsoft System Center Configuration Manager and PowerShell Solutions at Coretech. Kaido frequently speaks at European conferences and had his US debut as speaker at MMS April 2013. Kaido is well-known in the Configuration Manager communities where he’s a key player in the PowerShell game. Kaido host one of the most complete Configuration Manager PowerShell library’s in the world with hundreds of free code samples ready to download and implement – www.cm12sdk.net. Kaido has been awarded Microsoft Most Valuable Professional (MVP) in Microsoft Enterprise Client Management for his work with Configuration Manager from 2011 – to present. Kaido is the founder of System Center User Group Estonia in 2011.


  1. AppsupDBA  June 10, 2016

    Hi Kaido,

    Thanks for the script

    I am seeing this error when i try to clean up cache.
    Exception calling “DeleteCacheElement” with “1” argument(s): “Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))”

    Though I can manually delete files from ccmcache folder.

    Now my question is, what permissions do i need to perform above action. I will check with my SCCM admin accordingly.


Add a Comment