Clearing Out SCCM Cache On Client Machine Automatically

1

I would like to run a script that clears out the SCCM cache on a client computer automatically. To do this, I have written a simple batch file:

if exist %Windir%\ccmcache (
    RMDIR %Windir%\ccmcache /S /Q
)

I have deployed this as an "application" through SCCM. Basically I have created the deployment to run this script as the "uninstallation" of the program and chosen the detection method to check the existence of %Windir%\ccmcache on the client machine. The problem is that when it's trying to clear out the cache, the batch file that's running is stored in the cache and then it fails. I get the following error:

The software change returned error code 0x87D01106(-2016407290).

Is there any work around for this?

batch-file
sccm
asked on Server Fault Dec 1, 2015 by yhussain

1 Answer

0

You might try the Run Scripts functionality: Create and run PowerShell scripts from the Configuration Manager console

The biggest limitation is no scheduling available to the best of my knowledge (you also need to be on at least one of the last couple of current branch releases).

answered on Server Fault May 30, 2018 by Bryan Powell

User contributions licensed under CC BY-SA 3.0