diff --git a/Clear_Browser_Caches b/Clear_Browser_Caches.ps1 similarity index 82% rename from Clear_Browser_Caches rename to Clear_Browser_Caches.ps1 index 1248ead..636ae74 100644 --- a/Clear_Browser_Caches +++ b/Clear_Browser_Caches.ps1 @@ -82,6 +82,29 @@ Remove-Item -path "C:\Users\$($_.Name)\AppData\Local\Google\Chrome\User Data\Def } Write-Host -ForegroundColor yellow "Done..." + "" + "-------------------" + # Clear Desktop and Downloads folder + Write-Host -ForegroundColor Green "SECTION 6: Clearing Desktop and Downloads folder" + "-------------------" + Write-Host -ForegroundColor yellow "Clearing Desktop and Downloads folder" + Write-Host -ForegroundColor cyan + Import-CSV -Path C:\users\$env:USERNAME\users.csv | foreach { + Remove-Item -path "C:\Users\$($_.Name)\Downloads\*" -Exclude *.ini -Recurse -Force -EA SilentlyContinue -Verbose + Remove-Item -path "C:\Users\$($_.Name)\Desktop\*" -Exclude *.url,*.lnk,*.rdp,*.ini -Recurse -Force -EA SilentlyContinue -Verbose + } + Write-Host -ForegroundColor yellow "Done..." + "" + "-------------------" + # Clear RDP Cache + Write-Host -ForegroundColor Green "SECTION 7: Clearing Terminal Server Client Cache" + "-------------------" + Write-Host -ForegroundColor yellow "Clearing RDP Cache" + Write-Host -ForegroundColor cyan + Import-CSV -Path C:\users\$env:USERNAME\users.csv | foreach { + Remove-Item -path "C:\Users\$($_.Name)\AppData\Local\Microsoft\Terminal Server Client\Cache\*" -Recurse -Force -EA SilentlyContinue -Verbose + } + Write-Host -ForegroundColor yellow "Done..." "" Write-Host -ForegroundColor Green "All Tasks Done!" } else {