Showing posts with label ccmcache. Show all posts
Showing posts with label ccmcache. Show all posts

Wednesday, 24 August 2022

Clear - CCMCache remotely using Configuration Manger Console & PowerShell Script

Have you ever needed to remotely clean the ccmcache folder on a computer? This blog article will explain how:

Step 1 - Add following PowerShell script in Software Library > Scripts:

## Initialize the CCM resource manager com object
[__comobject]$CCMComObject = New-Object -ComObject 'UIResource.UIResourceMgr'
## Get the CacheElementIDs to delete
$CacheInfo = $CCMComObject.GetCacheInfo().GetCacheElements()
## Remove cache items
ForEach ($CacheItem in $CacheInfo) {
$null = $CCMComObject.GetCacheInfo().DeleteCacheElement([string]$($CacheItem.CacheElementID))
}

Step 2 - In the Configuration Manager (SCCM/MECM) console, locate the computer. 
Step 3 - Click it with the right mouse button and select Run Script > Select the Script you added > Next. 
Step 4 - Wait for the process to complete, and monitor Script Status Monitoring for output.

What's new in Microsoft Intune: April 2025

Microsoft Intune's April 2025 release introduces several enhancements aimed at improving device management and security: Custom Naming ...