SCCM - Clear the ccmcache remotely

Ever needed to clear the ccmcache folder on a computer remotely? This post will tell you how
Make sure that you have right click tools installed in SCCM

  1. Find the computer in the SCCM console
  2. Right click on it, and go to right click tools > console tools > Interactive powershell prompt
  3. Use these commands to clear the ccmcache
$resman= New-Object -ComObject "UIResource.UIResourceMgr"
$cacheinfo.GetCacheElements()  | foreach {$cacheInfo.DeleteCacheElement($_.CacheElementID)}

If you want to clean up the computer more, run these commands

WinSXS folder:
dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase

Run Windows Cleanup:
schtasks.exe /Run /TN "\Microsoft\Windows\Servicing\StartComponentCleanup"

To verify the free disk space, run this in the command prompt:
fsutil volume diskfree c:


Share on Google Plus

About Tom DeMeulenaere

Highly accomplished information technology professional with extensive knowledge in System Center Configuration Manager, Windows Server, SharePoint, and Office 365.
    Blogger Comment


Post a Comment

Note: Only a member of this blog may post a comment.