ccmcache cleaner(powershell ccmcache清理脚本)

Whats CCMCache folder?

The ccmcache folder is used by System Center Configuration Manager (SCCM) client. This is where files downloaded by SCCM are stored. SCCM is an enterprise software management system used in many Windows environment, and provides operating system and software deployment services, remote management, reporting services, etc. You will typically only find this folder on systems in a managed enterprise environment."

ccmcache文件夹是由系统中心配置管理器(SCCM)客户端使用,是SCCM下载的文件的存储位置。 SCCM是在许多Windows环境中使用的企业软件管理系统,并提供操作系统和软件部署服务,远程管理,报告服务等。通常在托管企业环境中的系统上可以找到此文件夹, 包括企业个人WINDOWS服务器或者WINDOWS服务器。”

Powershell script

There is the code in below ,please run as Admin so that have enough permission to clean the cache files.

ECHO "  _   _         _         _        _        _       _               _   _       "
ECHO " /   /   |\/|  /    /\   /   |_|  |_       /   |   |_   /\   |\ |  |_  |_)      "
ECHO " \_  \_  |  |  \_  /--\  \_  | |  |_       \_  |_  |_  /--\  | \|  |_  | \      "
ECHO "                                                 By zhengkai.blog.csdn.net      "
ECHO ""
ECHO "Whats ccmcache folder?"
ECHO "----------------------"
ECHO "The ccmcache folder is used by System Center Configuration Manager (SCCM) client. This is where files downloaded by SCCM are stored. SCCM is an enterprise software management system used in many Windows environment, and provides operating system and software deployment services, remote management, reporting services, etc. You will typically only find this folder on systems in a managed enterprise environment."
ECHO ""
ECHO "CCMCache Cleaning......"
#20200907    Moshow K ZHENG    delete all files.
$TargetFolder = "C:\Windows\ccmcache" 
$Files = get-childitem $TargetFolder -force
Foreach ($File in $Files)
{
    
    
    $FilePath=$File.FullName
    Remove-Item -Path $FilePath -Recurse -Force
}
ECHO "Clean Done!"

猜你喜欢

转载自blog.csdn.net/moshowgame/article/details/108450623