🧰 Windows Maintenance Tool — Change Log
Version 3.8.2
🔧 Analyzer & Quality Fixes
- Removed all PSScriptAnalyzer warnings
- Fixed
PSUseApprovedVerbs
by renaming all functions to proper Verb–Noun format
(e.g.Choice-2
→Invoke-Choice2
,Check-DoHStatus
,Test-SystemShortcut
, etc.) - Corrected
$null
comparisons to use PowerShell’s standard form:
if ($null -eq $variable)
- Cleaned up all
DeclaredVarsMoreThanAssignments
warnings. - Removed unused variables (
$input
,$profile
,$sdkCheck
, etc.)
- Fixed
- Added resilient
Clear-Host
wrapper- Prevents “Handle is invalid” errors in headless or limited terminals.
- Keeps menu rendering stable even when console clearing fails.
- Improved error handling
- Added global
trap
for better runtime stability. - Refined exception handling in menu functions and diagnostics.
- Added global
⚙️ Runtime & Functional Improvements
- .NET Runtime & SDK detection
- Simplified logic — now uses
$LASTEXITCODE
instead of capturing output. - Removed redundant variable assignments for cleaner analyzer compliance.
- Simplified logic — now uses
- Network & Connectivity module
- Verified working functions:
Flush-DNS
Reset-TCP/IP
Renew-IP
Winsock Reset
Test-InternetConnection
- Confirmed commands execute correctly under admin context.
- Verified working functions:
- ExecutionPolicy & Admin elevation
- Added automatic restart under
Run as Administrator
if permissions are missing. - Added user guidance for restricted execution policy.
- Added automatic restart under
🎨 User Interface & Usability
- Improved output formatting — colored messages for task states:
🟡 Running, 🟢 Success, 🔴 Error - Added safe
Pause-Menu
fallback whenRead-Host
input is unavailable. - Fixed occasional flicker when redrawing the main menu.
- Script now exits cleanly when menu input is invalid or terminated early.
🧩 Structural & Internal Cleanup
- Removed legacy DNS validation loop and redundant collectors.
- Ensured all
IDisposable
objects are safely released before re-assignment. - Reorganized function structure alphabetically and grouped by module.
- Verified compatibility across:
- Windows PowerShell 5.1
- PowerShell 7.x and 7.5+
✅ Verification Summary
Check | Result |
---|---|
Syntax errors | None |
PSScriptAnalyzer warnings | None |
ExecutionPolicy handling | Passed |
PowerShell 7+ compatibility | Verified |
Network module commands | Operational |
⚙️Features🔧
Send in your ideas so we can keep improving the tool 💯