This script provides an interactive menu-driven interface for performing various maintenance tasks on a Windows machine. Tasks include backup, repair, cleanup, drive optimization, or all tasks sequentially.
- Windows 11
Note: This script relies on PowerShell commands and tools like DISM, Robocopy, SFC, and WinGet, which are supported on the above-listed versions of Windows.
- Open PowerShell as an Administrator.
- Run build.py and then navigate to the directory
build
where this script is located.- Use the
cd
command to change directories. Example:cd build
- Use the
- Run the script by typing:
.\winDragon_{version}.ps1
- Follow the interactive prompts to select the tasks you wish to perform.
- PowerShell 7.4.6 or newer
- Administrator privileges to perform system-level operations like repair, cleanup, and optimization.
- Internet connection for software updates and online searches.
- Windows Defender enabled for virus scanning.
- 🔄 Mirror Backup: Uses Robocopy to create a mirror backup of specified directories.
- 🔧 Repair Tasks: Utilizes DISM and SFC to check and repair system health.
- 📦 Update Installed Software: Updates all installed software using WinGet.
- 🧹 Cleanup Tasks: Performs advanced disk cleanup using Windows Clean Manager.
- 💽 Drive Optimization: Optimizes SSDs and HDDs using appropriate methods.
- ℹ️ System Information: Collects and displays detailed system information.
- 📊 Event Log Analysis: Analyzes system event logs for errors and warnings.
- 🔍 Online Search: Generates a Bing search URL for the given information.
- 🛡️ Virus Scan: Runs a virus scan using Windows Defender.
Displays an ASCII art dragon.
Displays a message with a decorative border in yellow color.
Displays an error message with a decorative border in red color.
Displays a task menu for the user to select from various maintenance tasks.
Prompts the user to enter the source and destination directories for a backup operation.
Handles errors that occur during various tasks and collects those errors for a summary report.
Logs messages to a specified log file located in a dated folder.
Runs a virus scan using Windows Defender based on the current status.
Initiates a backup operation using Robocopy.
Performs a series of system repair tasks using various system tools.
Executes an advanced disk cleanup using the built-in Windows tool.
Performs disk optimization on all physical drives detected by the system.
Collects and displays detailed information about the computer's hardware and system configuration.
Generates a Bing search URL for the given information.
Analyzes system event logs for errors and warnings.
Updates all installed packages using various package managers including Winget, Chocolatey, Scoop, Pip, Npm, .NET Tools, and PowerShell modules.
Initializes a settings file for managing backup sources, destinations, and common .gitignore
items.
Initiates the Windows maintenance process by ensuring the Task Scheduler service is running and triggers Windows Automatic Maintenance.
Checks if any Windows maintenance processes are currently running and waits for them to complete before proceeding.
Displays a progress bar while executing a series of tasks sequentially.
You are running this script at your own risk. Please ensure you have backups of your important data before running any maintenance tasks. Ensure Windows Defender is enabled for virus scanning.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
Daniel Penrod