Simple scripts to clear temp files and browser cache/history
To run this with parameters, do the following:
- Download the .zip file on the main page of the GitHub and extract the .zip file to your desired location, e.g. -
c:\WindowsClearCache - Once extracted, open PowerShell (or PowerShell ISE) as an Administrator
- Enable PowerShell execution:
Set-ExecutionPolicy Unrestricted -Force(to allow executing unsigned code) - On the prompt, change to the directory where you extracted the files:
e.g. -
cd c:\WindowsClearCache - Next, to run the script, enter in the following:
e.g. -
.\DriveClean.ps1
Verified on the following platforms:
| Windows Version | Yes/No? |
|---|---|
| Windows Server 2019 | Yes |
| Windows Server 2016 | Yes |
| Windows Server 2012 R2 | Yes |
| Windows Server 2012 | Yes |
| Windows Server 2008 R2 | Yes |
| Windows Server 2008 | Yes |
| Windows Server 2003 | No |
| Windows 10 | Yes |
| Windows 8 | ??? |
| Windows 7 | ??? |
| Windows Vista | No |
| Windows XP | No |
| Windows 2000 | No |
It is likely to work on other platforms as well. If you try it and find that it works on another platform, please let me know.
WARNING: I do NOT take responsibility for what may happen to your system! Run scripts at your own risk!