Last active
November 18, 2019 20:38
-
-
Save robert-moses/12374bdeee8f491bc1cd5f4283faf0f9 to your computer and use it in GitHub Desktop.
PS to clear IE, Chrome and FF browser caches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# | |
# To Do: | |
# Switch to either another variable for user profiles (all) or to simply sort through the c:\users\ folder. | |
# | |
# | |
#Delete Internet Explorer Cache | |
Remove-Item -path "$env:USERPROFILE\AppData\Local\Microsoft\Windows\Temporary Internet Files\*" -Recurse -Force -EA SilentlyContinue -Verbose | |
Remove-Item -path "$env:USERPROFILE\AppData\Local\Microsoft\Windows\INetCache\*" -Recurse -Force -EA SilentlyContinue -Verbose | |
Write-Host -ForegroundColor yellow "Internet Explorer Cache Removal - COMPLETE" | |
#Delete Google Chrome Cache | |
Remove-Item -path "$env:USERPROFILE\AppData\Local\Google\Chrome\User Data\Default\Cache\*" -Recurse -Force -EA SilentlyContinue -Verbose | |
Write-Host -ForegroundColor yellow "Google Chrome Cache Removal - COMPLETE" | |
#Delete Firefox Cache | |
#Remove-Item -path "$env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\*.default\cache\*.*" -Recurse -Force -EA SilentlyContinue -Verbose | |
Remove-Item -path "$env:USERPROFILE\AppData\Local\Mozilla\Firefox\Profiles\*.default\cache2\entries\*.*" -Recurse -Force -EA SilentlyContinue -Verbose | |
Write-Host -ForegroundColor yellow "Firefox Cache Removal - COMPLETE" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment