Category: PowerShell & Command-line Scripts
Author: PCHF Staff / Community Toolkit
Version: 1.3 (October 2025)
Summary:
Automates Windows Update cleanup, temporary-file removal, log rotation, and Defender scan initiation—all via PowerShell.
Usage (sample commands):
Code:
Start-Process cleanmgr -ArgumentList '/sagerun:1' Remove-Item "$env:Temp\*" -Recurse -Force -ErrorAction SilentlyContinue Start-MpScan -ScanType QuickScan DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase
• Run as Administrator.
• Logs are saved to C:\PCHF_Toolkit\Logs\.
• Ideal for routine maintenance before backups or imaging.
Last updated: October 2025 • Verified by PCHF Staff