Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Script to clear all browser cache


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! 






1 comment
Date Votes
  • 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',
    'Login Data',
    'Top Sites',
    'Visited Links',
    'Web Data')
    $Folder = "$($env:LOCALAPPDATA)\Google\Chrome\User Data\Default"
    $Items | % {
    if (Test-Path "$Folder\$_") {
    Remove-Item "$Folder\$_"