The Windmill Club logo

The Windmill Club

Agentic AI for the rest of us — a project of PCSNJ

Windows System Health Audit

A real, working tool produced by a live agentic AI system. It checks the health of a Windows computer and writes a plain-English report. Inspect it, run it, and see the result for yourself.

What it does

A single PowerShell script that gathers the most useful health indicators of a Windows computer into one readable report:

SectionWhat it readsWhy it's useful
System overviewComputer name, Windows version, uptime, memoryA snapshot of what you're working with
Error eventsLast 24h of critical/error events (System & Application logs)Repeated errors are often the first sign of a conflict
Driver healthDevice drivers that report a problem codeA broken driver can cause crashes, no sound, no network
Failed servicesServices set to auto-start that are NOT runningA service that won't start can break an app or feature
Disk healthPhysical drives and their SMART statusA failing drive is dangerous and preventable
Security — please read.
This script is read-only. It reads Windows logs and system information, and creates one text report file. It does not change settings, delete files, download anything, or connect to the internet. We show the full code below so you can verify every line before you run it. Your computer, your choice.

How to run it

  1. Open Windows PowerShell. Press the Start menu, type PowerShell, and click it.
  2. Copy the script from the box below (use the Copy button).
  3. Paste it into the PowerShell window and press Enter.
  4. The report opens automatically in Notepad. It's also saved as System_Health_Report_YYYYMMDD.txt in your current folder.
Tip: Start with the "*** SUMMARY ***" section at the end of the report. If it says "Looks healthy," you're in good shape. If it lists issues, look back at the matching sections for details.

The script

Produced by an agentic AI on request, then reviewed and tested. Here it is in full:

# ============================================================
#  WINDOWS SYSTEM HEALTH AUDIT  (PowerShell)
#  Reads logs + system info, writes a plain-English report.
#  READ-ONLY: does not change, delete, or download anything.
# ============================================================

if ((Get-ExecutionPolicy) -match 'Restricted') {
    Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
}

$reportPath = Join-Path $PWD.Path ("System_Health_Report_" + (Get-Date -Format 'yyyyMMdd_HHmm') + ".txt")
$output = New-Object System.Collections.Generic.List[string]
function Add-Line($text) { $output.Add($text) }

Add-Line "============================================================"
Add-Line " 1. SYSTEM OVERVIEW"
Add-Line "============================================================"
$os = Get-CimInstance Win32_OperatingSystem
$cs = Get-CimInstance Win32_ComputerSystem
Add-Line ("Computer name : " + $cs.Name)
Add-Line ("Windows        : " + $os.Caption + " (build " + $os.BuildNumber + ")")
$uptime = (Get-Date) - $os.LastBootUpTime
Add-Line ("Uptime         : " + "$($uptime.Days) days, $($uptime.Hours) hours, $($uptime.Minutes) minutes")
$totalMemGB = [math]::Round($os.TotalVisibleMemorySize / 1MB, 1)
$freeMemGB  = [math]::Round($os.FreePhysicalMemory / 1MB, 1)
Add-Line ("Memory         : " + $freeMemGB + " GB free / " + $totalMemGB + " GB total")
Add-Line ""

Add-Line "============================================================"
Add-Line " 2. CRITICAL / ERROR EVENTS (last 24 hours)"
Add-Line "============================================================"
$since = (Get-Date).AddHours(-24)
foreach ($logName in @('System', 'Application')) {
    Add-Line ("--- " + $logName + " log ---")
    try {
        $events = Get-WinEvent -FilterHashtable @{ LogName = $logName; Level = 1, 2; StartTime = $since } -MaxEvents 20 -ErrorAction SilentlyContinue
        if ($events) {
            foreach ($e in $events) {
                Add-Line ("  [" + $e.TimeCreated.ToString('MM/dd HH:mm') + "] " + $e.ProviderName + "  (ID " + $e.Id + ")")
                Add-Line ("      " + $e.Message.Split("`n")[0])
            }
        } else { Add-Line "  No critical/error events in the last 24 hours." }
    } catch { Add-Line "  (Could not read this log - may require admin rights.)" }
    Add-Line ""
}

Add-Line "============================================================"
Add-Line " 3. DEVICE DRIVER HEALTH"
Add-Line "============================================================"
$problemDrivers = Get-CimInstance Win32_PnPEntity -ErrorAction SilentlyContinue |
    Where-Object { $_.ConfigManagerErrorCode -and $_.ConfigManagerErrorCode -ne 0 }
if ($problemDrivers) {
    foreach ($d in $problemDrivers) {
        Add-Line ("  [!] " + $d.Name + "  (Problem Code " + $d.ConfigManagerErrorCode + ")")
    }
    Add-Line ("  Total drivers with a problem: " + @($problemDrivers).Count)
} else { Add-Line "  No device driver problems found. Good." }
Add-Line ""

Add-Line "============================================================"
Add-Line " 4. SERVICES SET TO AUTO-START THAT FAILED"
Add-Line "============================================================"
Add-Line "Services that should start with Windows but are NOT running"
Add-Line "could indicate a conflict or a broken install. Some services"
Add-Line "are expected to stop when idle (updaters, on-demand tools);"
Add-Line "those are filtered out so only real issues are flagged."
Add-Line ""
$benignServices = @('edgeupdate','edgeupdatem','GoogleUpdaterInternalService','GoogleUpdaterService','Intel(R) Platform License Manager Service','MapsBroker','sppsvc','XTU3SERVICE','gupdate','gupdatem')
$allAutoServices = Get-CimInstance Win32_Service -ErrorAction SilentlyContinue |
    Where-Object { $_.StartMode -eq 'Auto' -and $_.State -ne 'Running' }
$failedServices = $allAutoServices | Where-Object { $_.Name -notin $benignServices }
if ($failedServices) {
    foreach ($s in $failedServices) {
        Add-Line ("  [!] " + $s.Name + "  - " + $s.State)
    }
    Add-Line ("  Total: " + @($failedServices).Count)
} else { Add-Line "  No concerning auto-start service failures found." }
Add-Line ""

Add-Line "============================================================"
Add-Line " 5. DISK HEALTH"
Add-Line "============================================================"
try {
    $disks = Get-PhysicalDisk -ErrorAction Stop | Select-Object FriendlyName, MediaType, HealthStatus, Size
    foreach ($d in $disks) {
        $sizeGB = [math]::Round($d.Size / 1GB, 0)
        Add-Line ("  " + $d.FriendlyName + "  [" + $d.MediaType + "]  " + $d.HealthStatus + "  (" + $sizeGB + " GB)")
    }
} catch { Add-Line "  (Get-PhysicalDisk not available - needs Win10/Server or admin rights.)" }
Add-Line ""

Add-Line "============================================================"
Add-Line " 6. *** SUMMARY ***"
Add-Line "============================================================"
$problems = 0
if ($problemDrivers) {
    Add-Line ("  - " + @($problemDrivers).Count + " device driver(s) have a problem.")
    $problems += @($problemDrivers).Count
} else { Add-Line "  - No device driver problems." }
if ($failedServices) {
    Add-Line ("  - " + @($failedServices).Count + " auto-start service(s) failed to run.")
    $problems += @($failedServices).Count
} else { Add-Line "  - All auto-start services are running." }
Add-Line ""
if ($problems -eq 0) {
    Add-Line "  Looks healthy. No driver or service problems detected."
} else {
    Add-Line ("  Found " + $problems + " issue(s) to investigate (see sections above).")
}

Add-Line ""
Add-Line "============================================================"
Add-Line "Report generated automatically by an agentic AI assistant."
Add-Line "Saved to: " + $reportPath
Add-Line "============================================================"

$output | Out-File -FilePath $reportPath -Encoding UTF8
Write-Host ""
Write-Host "Done! Report saved to:"
Write-Host "  " $reportPath
Write-Host ""
Write-Host "Opening the report for you now..."
Write-Host ""
Start-Process notepad.exe -ArgumentList $reportPath
Read-Host "Press Enter to close"

Reading the report

The bigger idea. You just used a working tool built by an agentic AI. Once you've run it and seen it work, you'll start to see the possibilities — building tools for your home, your home office, or a small business, each made the same way: describe what you need, inspect the result. That's what The Windmill Club is about.

Not sure what it means? Ask an AI to interpret it.

You don't have to understand every line of the report yourself. A great way to learn — and a real-world example of how agentic AI works — is to paste the report into a chatbot and ask it to interpret it for you.

  1. Open the report in Notepad (it opens automatically).
  2. Select all (Ctrl+A) and copy (Ctrl+C) the text.
  3. Open a chatbot — Microsoft Copilot, Google Gemini, or ChatGPT — using the links below.
  4. Paste the report and ask something like:
    "Interpret this Windows system health report and tell me, in plain English, what — if anything — needs my attention, and why."

Quick links: Microsoft Copilot · Google Gemini · ChatGPT

A note on privacy. The report is created locally on your computer, but when you paste it into a chatbot, you are sending that text to the chatbot's company. A system health report is generally low-sensitivity, but if you're on a work computer or the report mentions anything you consider private, be aware you're sharing it. When in doubt, you can paste only the "*** SUMMARY ***" section instead of the whole report.
Why this matters. You just combined three tools — a script that gathers data, an AI that explains it, and you deciding what to do. That's the same pattern at the heart of agentic AI: automation + intelligence + human judgment. You're not just running a tool — you're learning to work with AI to solve problems.
← Back to Home