Script to clear all browser cache
Tony Santarcangelo
Hello,
I'm not sure if I'm posting this in the correct spot. I've done various searches online for this. Not finding exactly what I need so I'm asking :) I am looking for script (batch or PowerShell) that I can deploy with PDQ Deploy that will clear all browser cache for all users or the logged on user. Any help would be greatly appreciated!
Thanks,
Tony
1
Comments
I found this on some script sites....but I cannot seem to deploy it via PDQ Deploy Enterprise.....the script works fine if run locally
$Items = @('Archived History',
'Cache\*',
'Cookies',
'History',
'Login Data',
'Top Sites',
'Visited Links',
'Web Data')
$Folder = "$($env:LOCALAPPDATA)\Google\Chrome\User Data\Default"
$Items | % {
if (Test-Path "$Folder\$_") {
Remove-Item "$Folder\$_"
}
}