Latest Posts

Clear CCM Cache folders in the 64bit SCCM 2012 Client machines

The below VBS script will clear the ccmache folders on 64bit SCCM 2012 Client machines.

This will delete all the folders with date modified of 7 days and older than to the current date.

Dim objFSO
Dim objFolder
Dim objSubFolder
Dim winsh
Dim winenv
Const intDaysOld = 7
set winsh = CreateObject(“WScript.Shell”)
set winenv = winsh.Environment(“Process”)
windir = winenv(“WINDIR”)
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
if objFSO.FolderExists (windir & “\ccmcache”) Then
Set objFolder = objFSO.GetFolder(windir & “\ccmcache”)
For Each objSubFolder In objFolder.SubFolders
If objSubFolder.DateLastModified < DateValue(Now() – intDaysOld) Then
objSubFolder.Delete True
End If
End if



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s