A PowerShell solution to automate routine Windows maintenance tasks on a weekly schedule.
This repository contains two scripts:
- CreateWeeklyMaintenance.ps1 β bootstraps and installs the maintenance task.
- WeeklyMaintenance.ps1 β performs Disk Cleanup, SFC scan, DISM restore, and optional reboot.
- Configurable toggles β enable/disable Disk Cleanup, SFC, DISM, and reboot steps
- Runs as SYSTEM β full privileges for system-level repairs
- Scheduled every Sunday @ 11:00 PM β hands-off weekly maintenance
- Idempotent setup β re-running the setup script overwrites existing task
- Windows 10 / Server 2016 or newer
- PowerShell 5.1 or later
- Administrative privileges to register scheduled tasks