Skip to content

Remotely or locally automates the cleanup of temporary files and browser caches across user profiles on remote Windows computers using PowerShell.

License

Notifications You must be signed in to change notification settings

Myraas/Remote-Disk-Cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

Remote-Disk-Cleanup

Description:

Remote-Disk-Cleanup is a PowerShell script designed to automate the process of cleaning temporary files and caches across all user profiles on a remote computer. This tool performs the following tasks:

  • Cleans temporary file paths across all user profiles.
  • Erases Internet Explorer, Mozilla Firefox, and Google Chrome browser caches.
  • Runs Windows Disk Cleanup with sageset parameters.
  • Empties old Recycle Bin contents.
  • Logs the cleanup process and reports the space recovered.

Features:

  • Local and Remote Execution: The script can be executed locally or remotely using PowerShell remoting.
  • Verbose Logging: Provides detailed logging for the cleanup process, which can be enabled or disabled based on preference.
  • WMI Repair: Includes an option to repair the WMI repository if needed.
  • Disk Cleanup Automation: Automates the Windows Disk Cleanup utility with predefined sageset parameters.
  • Cross-Browser Cache Cleaning: Cleans caches for popular browsers including Internet Explorer, Mozilla Firefox, and Google Chrome.

Usage:

  1. Set Global Flags:

    • $global:LocalRun to true for local execution or false for remote execution.
    • $global:EnableVerbose to true to enable verbose logging or false to disable it.
    • $global:RepairWMI to true to enable WMI repair or false to disable it.
  2. Run the Script:

    • Execute the script with administrative privileges.
    • Follow the prompts to enter the computer name and credentials for remote execution.

Disclaimer

Please note that while I have taken care to ensure the script works correctly, I am not responsible for any damage or issues that may arise from its use. Use this script at your own risk.

License

This project is licensed under the terms of the GNU General Public License v3.0.

About

Remotely or locally automates the cleanup of temporary files and browser caches across user profiles on remote Windows computers using PowerShell.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages