diff --git a/Private/ClearCCMCache.ps1 b/Private/ClearCCMCache.ps1 new file mode 100644 index 0000000..cfc2e2a --- /dev/null +++ b/Private/ClearCCMCache.ps1 @@ -0,0 +1,12 @@ +function Invoke-ClearCCMCache($ComputerName) { + #Checks if the path is accessible to the requested PC + if(Test-Path \\$ComputerName\C$){ + + Remove-Item \\$ComputerName\C$\Windows\ccmcache -Recurse + Write-Host "Removed \\$ComputerName\C$\Windows\ccmcache" -ForeGround Green + + }else{ + + Write-Host "Could not connect to [\\$ComputerName\C$]" -ForeGround Red + } +} \ No newline at end of file