Docs
List Computers Not Patched: How MSPs Audit the Devices That Really Need Review
Short Answer
Start with the in-scope device list and a required release baseline. Compare each device with current offer and installation evidence. Keep stale or offline devices in a separate unknown group.
Get-HotFix (Microsoft.PowerShell.Management) - PowerShell ยท about_Remote_Requirements - PowerShell
Build a list of computers missing required updates by joining dated offers to the device list and keeping stale or offline hosts visible.
Read the official guide: Microsoft Learn: Windows Update issues troubleshooting
What You'll Get
- Collect OS, build, hotfix, and update-restart evidence across Windows computers
- Keep failed queries and stale scans separate from verified devices
- Assign follow-up using a downloadable reporting worksheet
Find the computers behind the available-update list
In Available Updates, filter by the required KB and group the matching rows by hostname. Record Observed At. Join the results back to Devices so a computer that never returned inventory stays visible as unknown. Confirm any replacement package before opening a missing-patch ticket.
What Actually Counts as a Failed Patch
A failed installation is an event, while a missing update is a current gap against a required baseline. Keep both pieces of evidence. An older failed attempt may have a later successful retry; it should not remain an unresolved failure solely because it exists in history.
| Review state | Evidence needed | Next step |
|---|---|---|
| Missing | Fresh applicability evidence or a verified baseline gap | Confirm approval and maintenance window |
| Failed | An unsuccessful attempt with no later verified resolution | Record KB, time, error, and investigation owner |
| Reboot pending | Installation evidence plus a restart requirement | Arrange an approved restart, then verify again |
| Unknown | Unreachable device, collection failure, stale scan, or missing baseline | Restore visibility and collect evidence |
| Verified | Required baseline satisfied, fresh evidence, restart complete under your reporting rule | Retain the evidence and next review date |
These are review categories, not security guarantees. For failure investigation, continue to Windows Update failures and devices with failed updates.
Why Your RMM Does Not Show This Clearly
Before comparing computers, record the export time, last successful scan time, update source, device group, and required baseline. A check-in timestamp tells you the computer communicated; it does not establish when Windows last completed a successful applicability scan. Compare equivalent scopes: Windows security updates, Defender intelligence, drivers, and optional previews can have different policies.
Use your inventory as the starting denominator so offline devices remain visible. Join results by a stable device identifier when possible, and review duplicate or renamed hostnames before counting them. If the source report disagrees with current evidence, use patch report not accurate to investigate the mismatch.
How to Actually Find the Right Computers
1. Prepare the scope and prerequisites
- Export the in-scope inventory and choose a cutoff time in UTC. Set a freshness window, such as 24 hours, as an explicit local reporting rule.
- Group computers by Windows edition and release. Record the required KB or resulting build from the relevant Microsoft Windows release information and your approved deployment baseline. Do not reuse one KB across every release.
- For the script below, use Windows PowerShell 5.1 on Windows and an account permitted to query the target computers. WinRM, name resolution, and the permitted remoting path must already work. Default remoting endpoints normally require an administrator account. See Microsoft's remoting requirements.
- If remoting is unavailable, run the checks locally through your approved endpoint tooling. The procedure does not enable WinRM, change firewall rules, install modules, or request stored passwords.
2. Collect inventory and installation evidence
Create a local computers.txt containing one approved computer name per line. Replace the sample names with your scope. This script queries targets without installing updates, restarting computers, or changing update policy. It writes only a CSV on your administration computer.
$computers = Get-Content -LiteralPath '.\computers.txt' |
ForEach-Object { $_.Trim() } |
Where-Object { $_ } |
Sort-Object -Unique
$rows = foreach ($computer in $computers) {
try {
Invoke-Command -ComputerName $computer -ErrorAction Stop -ScriptBlock {
$ErrorActionPreference = 'Stop'
$os = Get-CimInstance -ClassName Win32_OperatingSystem
$version = Get-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
$hotfixes = @(Get-HotFix -ErrorAction Stop)
$latest = $hotfixes | Sort-Object InstalledOn -Descending | Select-Object -First 1
$systemInfo = New-Object -ComObject Microsoft.Update.SystemInfo
[pscustomobject]@{
Device = $env:COMPUTERNAME
OS = $os.Caption
Release = $version.DisplayVersion
Build = '{0}.{1}' -f $version.CurrentBuildNumber, $version.UBR
CapturedAtUtc = [datetime]::UtcNow.ToString('o')
LatestHotFix = $latest.HotFixID
WuaRebootRequired = $systemInfo.RebootRequired
Collection = 'Collected'
Error = ''
}
} | Select-Object Device, OS, Release, Build, CapturedAtUtc,
LatestHotFix, WuaRebootRequired, Collection, Error
}
catch {
[pscustomobject]@{
Device = $computer; OS = $null; Release = $null; Build = $null
CapturedAtUtc = [datetime]::UtcNow.ToString('o')
LatestHotFix = $null; WuaRebootRequired = $null
Collection = 'Unknown'; Error = $_.Exception.Message
}
}
}
$rows | Export-Csv -LiteralPath '.\patch-inventory.csv' -NoTypeInformation -Encoding UTF8
$rows | Format-Table Device, Release, Build, LatestHotFix, WuaRebootRequired, Collection
Synthetic sample output (KB and build values are placeholders, not a release baseline):
Device Release Build LatestHotFix WuaRebootRequired Collection
------ ------- ----- ------------ ----------------- ----------
SAMPLE-OFFICE-01 24H2 26100.example KB9000000 False Collected
SAMPLE-LAPTOP-02 24H2 26100.example KB9000000 True Collected
SAMPLE-REMOTE-03 Unknown
Collected means that the inventory queries completed. It does not mean compliant. CapturedAtUtc is the collection time, not the last Windows Update scan time.
Microsoft documents that Get-HotFix uses Win32_QuickFixEngineering. That inventory covers CBS-serviced updates, rather than every update type. An absent KB needs follow-up against the resulting OS build and any superseding update; the newest hotfix alone cannot prove compliance. The Windows Update reboot property reports update-related restart requirements; it is not a universal test for every application's reboot needs.
3. Add current applicability evidence
Join the inventory with the latest successful scan from your existing patching system. Retain the scan time and configured update source, then compare required and applicable updates for that OS release. Treat stale or failed scans as unknown under your freshness rule.
For an additional local check, this Windows PowerShell example reads cached WUA results. It does not initiate an online scan, download, or installation:
try {
$session = New-Object -ComObject Microsoft.Update.Session -ErrorAction Stop
$searcher = $session.CreateUpdateSearcher()
$searcher.Online = $false
$result = $searcher.Search("IsInstalled=0 and IsHidden=0 and Type='Software'")
if ([int]$result.ResultCode -ne 2) {
throw "Cached search incomplete; result code $($result.ResultCode)"
}
$result.Updates | Select-Object Title, IsDownloaded
"Cached offered software updates: $($result.Updates.Count)"
}
catch {
Write-Warning "Applicability unknown: $($_.Exception.Message)"
}
Microsoft describes the search criteria, the searcher's Online property, and operation result codes. Code 2 means success; code 3 permits incomplete results. A cached count of zero is not a fresh all-clear. This software filter excludes drivers and hidden updates but can still include Defender or optional software outside your security baseline.
How to Detect Failures With Real Signals
Keep the failure timestamp, update title or KB, result, and HRESULT together. Compare a failed attempt with later successful history and the current offered-update list before treating it as unresolved. Use Windows Update event evidence when the scan or install history needs investigation.
| Collection problem | Record | Follow-up |
|---|---|---|
| Name resolution, timeout, or offline endpoint | Unknown, with the requested computer retained | Check inventory and the approved network path |
| Access denied or remoting unavailable | Unknown, with the query error | Check permissions and remoting with the endpoint administrator |
| WUA exception or result code other than 2 | Applicability unknown | Review update-service and update-source evidence |
| No hotfix rows or no cached offers | Limited evidence | Confirm build, baseline, supersedence, and successful scan time |
| Partial collection | Unknown until the missing checks complete | Keep successful evidence separately and rerun the failed check |
Do not turn exceptions into 0 missing or No reboot. The inventory script deliberately returns a conservative unknown row if any required query fails.
What to Check Instead of Compliance Score
Review each computer's baseline, successful scan timestamp, current gap, restart requirement, and unresolved error. Retain a link to supporting evidence rather than inferring health from a single percentage. For the detailed verification procedure, see how to verify Windows patch state.
When Patching Is Actually Broken
Repeated installation failures, failed applicability scans, and restart requirements that persist after an approved restart need investigation. An offline device or an old scan needs a visibility check first. Neither is evidence of a successful patch cycle. Use report failed patches for a focused failure queue.
Turn the Device List Into Follow-Up Work
Assign each exception an owner, action, due date, and next verification time. After remediation through your approved patching process, collect fresh evidence and update the row. Keep the earlier failure as history.
Download the patch review worksheet (CSV, synthetic example rows), replace the sample rows with your own scope, and follow the patch reporting workflow and worked example. The worksheet is a manual reporting aid; it is not an automatic export or baseline evaluator.
PatchReporter provides Dashboard, Devices, Failed Updates, Successful Updates, and Available Updates views for agent-reported evidence. Use the Devices last-seen time as a check-in indicator and compare observed update records with your reporting cutoff. Apply your baseline and exception policy separately. See what the agent installs and collects before deployment.
FAQ
What is the best way to list computers not patched?
Start with all in-scope computers, define the required baseline for each Windows release, collect fresh evidence, and separate missing updates, unresolved failures, pending restarts, and unknown results.
Can Get-HotFix prove a computer is fully patched?
No. It queries Win32_QuickFixEngineering and does not cover every update type. Compare the OS build, superseding updates, current applicability evidence, and restart requirements with your baseline.
What should I do when a remote patch check fails?
Keep the device in scope and mark it unknown. Preserve the error and check the approved network path, permissions, remoting setup, and last successful scan before retrying.
Does zero cached available updates mean a computer is current?
No. Cached results can be old or incomplete and reflect a particular update source and filter. Verify successful scan freshness and the required baseline before assigning a verified state.