Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Clear_Browser_Caches → Clear_Browser_Caches.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down