From 774bce8ec7a88774d56e025a2c158726000542fc Mon Sep 17 00:00:00 2001 From: Zachary Gorman Date: Fri, 26 Jul 2024 11:44:25 -0700 Subject: [PATCH] Forgot to add a file! --- Private/ClearCCMCache.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Private/ClearCCMCache.ps1 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