Skip to content

Instantly share code, notes, and snippets.

View koekjesdoos's full-sized avatar

koekjesdoos koekjesdoos

View GitHub Profile
@koekjesdoos
koekjesdoos / Clean-CMClientCache.ps1
Created May 16, 2022 09:20 — forked from Ioan-Popovici/Clean-CMClientCache.ps1
Cleans the configuration manager client cache of all unneeded with the option to delete persistent content.
<#
.SYNOPSIS
Cleans the configuration manager client cache.
.DESCRIPTION
Cleans the configuration manager client cache of all unneeded with the option to delete persisted content.
.PARAMETER CleanupActions
Specifies cleanup action to perform. ('All', 'Applications', 'Packages', 'Updates', 'Orphaned'). Default is: 'All'.
If it's set to 'All' all cleaning actions will be performed.
.PARAMETER LowDiskSpaceThreshold
Specifies the low disk space threshold percentage after which the cache is cleaned. Default is: '100'.