WIN-016 · Script
System Health Report
Builds a readable HTML and CSV health report for the device, including recent results from other Runbookia scripts.
Version 1.0.0Language PowerShellUpdated November 2026Report only, changes nothing
What it does
Read-only. Collects a set of endpoint health checks and rates each one OK, Warning or Critical, then writes a single-page HTML report (easy to attach to a ticket or send to a client) and a CSV with the same rows.
Checks:
- Uptime and pending restart: days since last boot, and common pending-restart flags
- Disk space: free space on each fixed drive
- Memory: current memory use
- CPU: average processor load over a short sample
- Automatic services: automatic services that are not running (delayed-start
and trigger-start services are listed but not rated)
- Antivirus: Microsoft Defender status, or the antivirus registered
in Windows Security Center
- Firewall: Windows Firewall profiles
- Updates: days since the most recent installed update
- Event log: critical and error events in the System log
- Runbookia results: the last result line and any errors from each Runbookia
log in C:\ProgramData\Runbookia\Logs within -LogDays
Runs silently as SYSTEM from any RMM or Intune. No prompts.
Requirements
Windows PowerShell 5.1+, run as SYSTEM or local admin
How to run it
- Run as: SYSTEM or a local administrator
- Run from: any RMM or MDM, Intune, a Group Policy startup script, a scheduled task, or an elevated PowerShell window
- Script type: PowerShell, 64-bit
- User interaction: none; the script never prompts
- Timeout: 10 minutes (30 for Windows Update installs)
Settings
| Name | What it does | Options | Default |
|---|---|---|---|
| ClientName | Optional name shown in the report title, for example "Lincoln Elementary". | ||
| DiskWarnPercent | Warn when a drive has less free space than this percentage. Default 15. Critical below half of it. | 15 | |
| MemoryWarnPercent | Warn when memory use is above this percentage. Default 90. | 90 | |
| CpuWarnPercent | Warn when average CPU load is above this percentage. Default 90. | 90 | |
| UptimeWarnDays | Warn when the device has not restarted in this many days. Default 30. | 30 | |
| UpdateWarnDays | Warn when the newest installed update is older than this many days. Default 45. | 45 | |
| EventHours | How many hours of the System event log to check. Default 24. | 24 | |
| LogDays | How many days of Runbookia logs to summarize. Default 7. | 7 | |
| SkipRunbookiaLogs | Leave out the Runbookia results section. | False | |
| Format | Html, Csv or Both (default). | Html, Csv, Both | Both |
| ReportDir | Folder for the report files. Default C:\ProgramData\Runbookia\Reports | C:\ProgramData\Runbookia\Reports |
Exit codes
- 0 = All checks OK
- 1 = At least one Warning or Critical result
- 2 = Script error
Testing steps
- Run it on one test device and check the output and log.
- Check the exit code: 0 = OK, 1 = needs attention, 2 = error (see log), 9 = this copy is past its Valid until date.
- Roll out to a small group next, then everyone.
Rollback steps
Report only. Nothing is changed, so nothing needs to be rolled back.
Version and change log
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | November 2026 | First release. |