System Health Check is a zero-dependency, cross-host PowerShell desktop utility that combines deep Windows diagnostics, hardware and security auditing, and safe weekly maintenance into a native Fluent UI application.
Built to run seamlessly on both Windows PowerShell 5.1 and PowerShell 7.x across Windows 10 and Windows 11, it automatically elevates to Administrator, hides its console window, and executes a non-blocking background audit—delivering an actionable 0–100 Health Score alongside a 6-tab interactive dashboard.
- GitHub Repository: https://github.com/2civics/System-Health-Check
- PowerShell Gallery: https://www.powershellgallery.com/packages/SystemHealthCheck
- Recommended Shortcut Utility: https://github.com/2civics/PowerShell-Desktop-Shortcut-Creator
- Cross-Host Compatibility: Preserves whichever PowerShell engine launched it (
pwsh.exefor PowerShell 7.x orpowershell.exefor Windows PowerShell 5.1) and automatically enforces Single-Threaded Apartment (-STA) mode for WPF stability. - Win32 DWM Integration: Features custom
WindowChrome, native Dark/Light title bar theming, Windows 11 rounded window corners, and automatic console window hiding. - Non-Blocking Background Engine: Runs all CIM/WMI queries, event log scans, DISM checks, and cleanup tasks inside an isolated background runspace with real-time progress tracking so the UI never freezes.
- Atomic Dark & Light Themes: Instant one-click switching between Dark Mode and Light Mode without restarting the scan.
- Overview:
- 0–100 Health Score & Grade Ring: Weighted scoring across hardware, security, and stability with tier badges (Grade S
95–100, Grade A85–94, Grade B75–84, Grade C60–74, Grade D<60). - KPI Summary Cards: At-a-glance CPU/RAM load, System Drive free space, active security controls (
X / 12), and net disk space reclaimed. - System & Boot Identity: Hardware manufacturer/model, OS caption & build number, uptime, pending reboot flags (
CBS,Windows Update,Volatile), latest installed Windows hotfix, active power plan, and laptop battery design capacity vs. current charge health. - Score Deductions & Action Items: Itemized breakdown explaining every point deducted during the audit.
- 0–100 Health Score & Grade Ring: Weighted scoring across hardware, security, and stability with tier badges (Grade S
- Compute & Load:
- Processor model, physical core/logical thread topology, and live utilization bar.
- Physical RAM and pagefile utilization metrics.
- Visual Top 5 Memory Consumers and Top 5 Cumulative CPU Time process breakdowns.
- Storage & SMART:
- Logical fixed volumes with capacity bars and low-space thresholds (
<15%warning,<10%critical). - Physical drive health and SMART Reliability Counters (Wear %, Temperature °C, Power-On Hours).
- System-wide SSD TRIM policy verification (
DisableDeleteNotify) and Volume Shadow Copy (System Restore) point counts.
- Logical fixed volumes with capacity bars and low-space thresholds (
- Security Matrix:
- 12-Control Platform & Endpoint Audit:
- TPM 2.0 Module readiness
- UEFI Secure Boot status
- Microsoft Defender Real-Time Protection
- Defender Tamper Protection
- Virtualization-Based Security (VBS / VTL1)
- Memory Integrity (HVCI)
- Kernel-mode Hardware-enforced Stack Protection (KHSP)
- Credential Guard (
LsaIso) - LSA Protection (
RunAsPPL) - System Drive BitLocker Encryption
- Controlled Folder Access (Ransomware Protection)
- UAC (
EnableLUA) & Remote Desktop (RDP) posture
- Network & Firewall Telemetry: Active network adapter and link speed, IPv4/gateway info, round-trip ping latency (
1.1.1.1in ms), DNS resolution speed (microsoft.comin ms), and Windows Firewall profile states (Domain,Private,Public).
- 12-Control Platform & Endpoint Audit:
- Stability & Events:
DISM /Online /Cleanup-Image /CheckHealthcomponent store integrity check.- 24-hour System Critical/Error count, 24-hour Application Crashes (
Event ID 1000/1001), and 7-dayKernel-Power 41&WHEA-Loggerhardware error counters. - Automatic Services Audit: Separates true service failures from parked delayed-start or trigger-start services (
ExitCode 0/1077). - Startup Programs Inventory: Audits
HKLM(64-bit & 32-bit) andHKCURunregistry keys. - Live-Searchable Event Log Grid: Filter the last 24 hours of System Critical and Error events by source, Event ID, or message text.
- Maintenance:
- Age-Filtered Temp Cleanup (
> 7 days): Safely prunes stale files in$env:TEMP,C:\Windows\Temp, andAppData\Local\Temp. - UWP / Microsoft Store App Cleanup (
> 7 days): Clears stale files insidePackages\*\TempStateandAC\Temp. - Delivery Optimization & Package Caches: Clears Windows Delivery Optimization cache via native cmdlets and prunes
UniGetUIandWingetdownload caches. - Recycle Bin & Network Cache Refresh: Empties the Recycle Bin (calculating exact reclaimed bytes beforehand) and flushes DNS and ARP caches.
- Hardware-Aware Drive Optimization: Automatically runs
TRIM(-ReTrim) on SSDs andDefrag(-Defrag) on HDDs. - Windows Defender Signature Update: Fetches fresh threat definitions via
Update-MpSignatureand reports update duration and signature version. - Non-Destructive Safeguards: Intentionally preserves Windows Update
SoftwareDistribution\Downloadpayloads andC:\Windows\Minidumpcrash files so active update states and troubleshooting data remain intact.
- Age-Filtered Temp Cleanup (
- Operating System: Windows 10 or Windows 11 (x64)
- PowerShell: Windows PowerShell 5.1 or PowerShell 7.x (
pwsh) - Permissions: Local Administrator privileges (the script automatically requests UAC elevation if launched from a standard user session)
- External Modules: None — 100% native Windows CIM/WMI, .NET, Win32 DWM, and WPF
Open PowerShell and run:
Install-Script -Name SystemHealthCheck -Scope CurrentUser
To update to the latest version in the future:
Update-Script -Name SystemHealthCheck
- Download
SystemHealthCheck.ps1from the Releases page or clone the repository:git clone [https://github.com/2civics/System-Health-Check.git](https://github.com/2civics/System-Health-Check.git)
- Place
SystemHealthCheck.ps1in your preferred scripts folder (for example,C:\Scripts\SystemHealthCheck.ps1).
For the cleanest setup without worrying about escaping quotes or execution policy flags, use PowerShell Desktop Shortcut Creator:
- Download or install PowerShell Desktop Shortcut Creator.
- Select your
SystemHealthCheck.ps1file (if installed via PowerShell Gallery, it is typically located at$env:USERPROFILE\Documents\PowerShell\Scripts\SystemHealthCheck.ps1for PS 7 or$env:USERPROFILE\Documents\WindowsPowerShell\Scripts\SystemHealthCheck.ps1for PS 5.1). - Name the shortcut System Health Check and choose your preferred PowerShell host (PowerShell 7 or Windows PowerShell 5.1).
- Select the
Hiddenwindow style option so no console window flashes before the Fluent UI opens. - Generate the shortcut and double-click it from your Desktop whenever you want to run an audit.
If you prefer to create the Desktop shortcut directly from a PowerShell terminal, run the snippet below. It automatically locates SystemHealthCheck.ps1, uses your active PowerShell host (pwsh.exe or powershell.exe), and configures -WindowStyle Hidden -STA:
# Locate the installed script (or replace with your manual path, e.g., 'C:\Scripts\SystemHealthCheck.ps1') $scriptCmd = Get-Command SystemHealthCheck.ps1 -ErrorAction SilentlyContinue $scriptPath = if ($scriptCmd) { $scriptCmd.Source } else { Join-Path ([Environment]::GetFolderPath('MyDocuments')) 'PowerShell\Scripts\SystemHealthCheck.ps1' } if (-not (Test-Path $scriptPath)) { throw "Could not find SystemHealthCheck.ps1 at '$scriptPath'. Update `$scriptPath manually." } # Use pwsh.exe if running in PowerShell 7+, otherwise powershell.exe $hostExe = if ($PSVersionTable.PSEdition -eq 'Core') { (Get-Command pwsh.exe).Source } else { "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" } $desktopPath = [Environment]::GetFolderPath('Desktop') $shortcutPath = Join-Path $desktopPath 'System Health Check.lnk' $wsh = New-Object -ComObject WScript.Shell $lnk = $wsh.CreateShortcut($shortcutPath) $lnk.TargetPath = $hostExe $lnk.Arguments = "-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -STA -File `"$scriptPath`"" $lnk.WorkingDirectory = Split-Path -Parent $scriptPath $lnk.IconLocation = "$env:SystemRoot\System32\shell32.dll,21" $lnk.Description = "System Health Check - Windows 10/11 Health & Maintenance Audit" $lnk.Save() Write-Host "Desktop shortcut created: $shortcutPath" -ForegroundColor Green
- Launch System Health Check from your Desktop shortcut or terminal.
- Approve the UAC Administrator prompt if not already running elevated.
- Wait ~5–15 seconds while the background engine audits hardware, security, event logs, and runs safe cleanup tasks.
- Explore the six tabs in the left sidebar, click Copy Summary to copy a formatted plain-text report to your clipboard, or click Re-Run Audit & Clean at any time.
| Score | Grade | Status | Meaning |
|---|---|---|---|
| 95 – 100 | S | Optimal | Hardware, platform security, and system stability are in peak condition. |
| 85 – 94 | A | Healthy | Strong overall posture with minor advisories (e.g., pending reboot or high uptime). |
| 75 – 84 | B | Fair | One or more recommended security features or disk thresholds need attention. |
| 60 – 74 | C | Attention | Multiple security controls disabled, elevated error rates, or low free disk space. |
| 0 – 59 | D | Critical | Critical issues detected (e.g., Defender Real-Time off, DISM corruption, or failing drive). |
- Automate Weekly Runs with Task Scheduler: Create a scheduled task set to run weekly with "Run with highest privileges" enabled, pointing to
pwsh.exe(orpowershell.exe) with arguments-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -STA -File "C:\Path\To\SystemHealthCheck.ps1". - Reviewing Security Matrix Colors: Core protections (TPM 2.0, Secure Boot, Defender Real-Time, VBS, HVCI, LSA Protection) deduct points and show red badges when inactive. Optional hardening controls (Controlled Folder Access, Credential Guard, Tamper Protection, BitLocker, UAC/RDP) show amber warning badges if off so you can evaluate them without unfairly tanking a standard desktop's score.
- Pending Reboots: Windows builds up
CBSorWindows Updatereboot flags after Patch Tuesday. If you see a-5 ptsdeduction for a pending reboot, restart Windows and click Re-Run Audit & Clean to verify the flag clears.
When installing with -Scope CurrentUser, PowerShell places scripts in Documents\PowerShell\Scripts (PS 7) or Documents\WindowsPowerShell\Scripts (PS 5.1). Either add that folder to your user PATH environment variable or launch the script using its full path.
If launching directly from a terminal with a restrictive execution policy, run:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
Or launch via your shortcut using -ExecutionPolicy Bypass.
- Windows Home Edition: Native BitLocker (
Get-BitLockerVolume) and Credential Guard require Windows Pro, Enterprise, or Education. On Windows Home, BitLocker will safely reportUnavailable. - BIOS/UEFI Settings: Ensure Intel PTT or AMD fTPM and Secure Boot are enabled in your motherboard firmware if TPM 2.0 or Secure Boot shows inactive.
- Third-Party Antivirus: If you use a third-party AV suite, Windows Defender Real-Time Protection and Tamper Protection will naturally report
OFFwhile the third-party engine is active.
If the Stability tab reports component store corruption, open an elevated terminal and run:
DISM.exe /Online /Cleanup-Image /RestoreHealth sfc /scannow
Reboot your PC afterward and re-run System Health Check to confirm DISM CheckHealth returns Healthy.
- Separated Audit & Cleanup Actions: Split the sidebar button into Re-Run Audit (Read-Only) and Clean & Optimize.
- Read-Only Startup Scan: Launching the app now runs a strictly read-only audit, previewing Est. Reclaimable Space and current Defender signature status without modifying files, caches, or drives until Clean & Optimize is clicked.
- Auto-Detected Light / Dark Theme: Automatically detects your Windows app theme (
AppsUseLightTheme) on startup while preserving the manual Switch to Light/Dark Mode toggle. - Dynamic UI & Safeguards:
- Overview KPI card, Maintenance header, and clipboard summary now switch cleanly between Reclaimable Space (audit mode) and Space Reclaimed (cleanup mode).
- Audit and Clean buttons are disabled while a runspace is active to prevent overlapping runs, and Clean & Optimize navigates to the Maintenance tab with a completion toast when finished.
- Native Fluent UI Desktop Application: Replaced the console-driven static HTML report with a full multi-page WPF desktop application featuring custom
WindowChrome, Win32 DWM Dark/Light title bar integration, Windows 11 rounded corners, and automatic console window hiding. - Cross-Host & Multi-OS Engine: Added host-preserving elevation (
pwsh.exefor PowerShell 7.x orpowershell.exefor Windows PowerShell 5.1) with automatic-STAapartment enforcement for WPF and dynamic Windows 10 / Windows 11 build detection. - Asynchronous STA Background Runspace: Moved all telemetry collection, event log parsing, DISM checks, and cleanup tasks off the UI thread with a live progress bar, one-click clipboard summary export, and on-demand re-scans.
- Weighted Health Scoring Engine: Added a 0–100 Health Score with Grade tiers (S, A, B, C, D) and an itemized deduction breakdown.
- Expanded Hardware, Compute & Storage Telemetry: Added hardware model detection, latest hotfix tracking, active power plan, laptop battery design health, Top 5 RAM and Top 5 CPU process charts, SMART power-on hours, system-wide TRIM policy verification, and Volume Shadow Copy restore point auditing.
- 12-Control Security Matrix & Network Latency: Expanded security auditing from 7 to 12 controls (adding TPM 2.0, UEFI Secure Boot, Defender Real-Time Protection, Tamper Protection, UAC, and RDP posture) and upgraded network checks to measure millisecond ping (
1.1.1.1) and DNS latency alongside Windows Firewall profiles. - Deep Stability & Searchable Event Logs: Added
DISM /CheckHealth, 24-hour Application crash tracking, 7-dayKernel-Power 41andWHEAhardware error counters, StartupRunkey inventory, smarter Automatic service filtering (ignoring parked delayed/trigger-start services), and a live-searchable event log grid. - Safer Weekly Maintenance Pipeline: Added age-filtered (
> 7 days) UWP/Store appTempStatecleanup and per-task byte reclamation accounting (including pre-empty Recycle Bin sizing), while removing automatic deletion of Windows UpdateSoftwareDistribution\Downloadpayloads and crashMinidumpfiles.
- Initial release featuring self-elevating console execution, 8-point system and security checks (OS/uptime, pending reboot, CPU/RAM, disk space/SMART wear, stopped Automatic services, ping/DNS check, 7-point DeviceGuard/LSA/BitLocker/CFA audit, and 24-hour System error logs), age-filtered cleanup, SSD TRIM / HDD Defrag, Windows Defender signature updates, and static HTML report export to the Desktop.