Create ClearFirefoxCache.ps1
This commit is contained in:
parent
b8662ef94e
commit
5e8064c9aa
|
@ -0,0 +1,17 @@
|
|||
Write-Host “Exporting the list of users to c:\users.csv”
|
||||
# List the users in c:\users and export to csv file for calling later
|
||||
dir C:\Users | select Name | Export-Csv -Path C:\users.csv -NoTypeInformation
|
||||
$list=Test-Path C:\users.csv
|
||||
# Clear Google Chrome
|
||||
Write-Host “Clearing FireFox caches”
|
||||
Import-CSV -Path C:\users.csv -Header Name | foreach {
|
||||
Remove-Item -path C:\Users\$($_.Name)\AppData\Local\Mozilla\Firefox\Profiles\*.default\cache\* -Recurse -Force -EA SilentlyContinue -Verbose
|
||||
Remove-Item -path C:\Users\$($_.Name)\AppData\Local\Mozilla\Firefox\Profiles\*.default\cache\*.* -Recurse -Force -EA SilentlyContinue -Verbose
|
||||
Remove-Item -path C:\Users\$($_.Name)\AppData\Local\Mozilla\Firefox\Profiles\*.default\cache2\entries\*.* -Recurse -Force -EA SilentlyContinue -Verbose
|
||||
Remove-Item -path C:\Users\$($_.Name)\AppData\Local\Mozilla\Firefox\Profiles\*.default\thumbnails\* -Recurse -Force -EA SilentlyContinue -Verbose
|
||||
Remove-Item -path C:\Users\$($_.Name)\AppData\Local\Mozilla\Firefox\Profiles\*.default\cookies.sqlite -Recurse -Force -EA SilentlyContinue -Verbose
|
||||
Remove-Item -path C:\Users\$($_.Name)\AppData\Local\Mozilla\Firefox\Profiles\*.default\webappsstore.sqlite -Recurse -Force -EA SilentlyContinue -Verbose
|
||||
Remove-Item -path C:\Users\$($_.Name)\AppData\Local\Mozilla\Firefox\Profiles\*.default\chromeappsstore.sqlite -Recurse -Force -EA SilentlyContinue -Verbose
|
||||
}
|
||||
Remove-Item -path c:\users.csv
|
||||
Write-Host “FireFox cache is cleared”
|
Loading…
Reference in New Issue