Library / Windows endpoint

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

NameWhat it doesOptionsDefault
ClientNameOptional name shown in the report title, for example "Lincoln Elementary".
DiskWarnPercentWarn when a drive has less free space than this percentage. Default 15. Critical below half of it.15
MemoryWarnPercentWarn when memory use is above this percentage. Default 90.90
CpuWarnPercentWarn when average CPU load is above this percentage. Default 90.90
UptimeWarnDaysWarn when the device has not restarted in this many days. Default 30.30
UpdateWarnDaysWarn when the newest installed update is older than this many days. Default 45.45
EventHoursHow many hours of the System event log to check. Default 24.24
LogDaysHow many days of Runbookia logs to summarize. Default 7.7
SkipRunbookiaLogsLeave out the Runbookia results section.False
FormatHtml, Csv or Both (default).Html, Csv, BothBoth
ReportDirFolder for the report files. Default C:\ProgramData\Runbookia\ReportsC:\ProgramData\Runbookia\Reports

Exit codes

  • 0 = All checks OK
  • 1 = At least one Warning or Critical result
  • 2 = Script error

Testing steps

  1. Run it on one test device and check the output and log.
  2. Check the exit code: 0 = OK, 1 = needs attention, 2 = error (see log), 9 = this copy is past its Valid until date.
  3. 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

VersionDateChanges
1.0.0November 2026First release.