- Documentation
- Getting Started
Windows update reports and exit codes
Interpret XML and JSON reports, preserve exit codes and distinguish operation results from verified post-reboot state.
A useful patch record includes the device, command, tool version, update source, result and restart state. Keep the raw evidence alongside your management system's interpretation. An AI assistant can summarize that evidence without running another command on the target machine.
Explore a report before connecting a machine
The Automation Lab shows an invented report as a readable summary, JSON and an XML excerpt. Its mixed result is intentional: one installation succeeds, another fails and a reboot remains required. Use it to check how your workflow presents partial success.
Collect a search report
Create the output directory, then run from an elevated command prompt on an approved pilot with no active patch or reboot workflow:
wuinstall /search /logfile "C:\Logs\wuinstall.txt" /xmlout "C:\Logs\wuinstall.xml"
Capture the native exit code immediately after WuInstall exits. Use a unique output path per run so an older report cannot be mistaken for a fresh result. A search report describes observed updates; it does not prove they were installed or that the machine meets every compliance requirement. See the starter wrapper for collecting separate run artifacts.
Choose the report format by version
XML reporting is available in stable 2.9.8. Version 3 is beta and adds /jsonout with a required file path. This is a report file, not JSON-only standard output. Review the reporting switches and test your parser against the executable you deploy.
For an existing JSON report, PowerShell can read the file directly:
Get-Content -Raw 'C:\Logs\wuinstall.json' | ConvertFrom-Json
From WuInstall 3.1 on the report starts with schema_version (2), and the 3.1 JSON schema describes it. Version 2 only adds fields, so a parser written for 3.0 keeps working. A report without schema_version comes from 3.0.x; the 3.0.4 JSON schema describes it. Use system_info.wuinstall_version to identify the emitter and retain the executed binary version with your run record. Do not assume the same contract for every beta or future release.
Separate three kinds of evidence
- Initial snapshot:
is_installedandis_downloadeddescribe the update when the search ran (from 3.1:search.started_at). They are not refreshed after installation. - Operation result:
installation_result_codeand reboot information describe what the operation reported. From 3.1,download_hresultandinstallation_hresultgive the HRESULT per update (for example0x80240022); with 3.0.x, use the log for further diagnostics. Preserve per-update failures even when other updates succeed. - Verified state: a successful installation result does not establish recovery after a reboot. Collect follow-up evidence after an approved restart and verify application health separately.
From 3.1, excluded_updates lists the updates the search found but the filters left out, each with the switch that did it in excluded_by — or duplicate for a second copy of an update the search returned twice. search.found and search.selected give the counts.
Keep the exit code beside the report
Use the return-code reference, including alternate error modes. Under default codes, 10 means success with reboot required, 11 means error with reboot required, and 5 means reboot initiated. Code 12 means the runtime limit was reached; that run writes no report file. From 3.0.5 on, a /jsonout report that cannot be written makes the run an error (1, or 11 with a pending reboot); with 3.0.4 and earlier, check that the file exists. None establishes that the machine is healthy after restarting. Codes 2 and 3 describe no available updates and no matching updates respectively, not a generic execution failure.
Check that a new, parseable report exists. From 3.1 on, a run that stops before it starts (a syntax error, an expired license, /service, /remote) still writes its JSON report, and result.stage names the reason; earlier versions write none there. The report is written before the restart: from 3.1 on, a restart that cannot be started makes WuInstall write both reports again with the final code (result.reboot.start_failed), while with 3.0.x the saved report and the final exit code can differ. Retain both plus the log; flag missing or conflicting evidence instead of marking the run successful.
Share only the evidence needed
Remove machine, domain and user identifiers from reports before sharing them with an external assistant or support contact. Review logs and command arguments for credentials. The AI agent guide includes a report-analysis prompt that keeps results, missing evidence and proposed next steps separate.
Next step
Evaluate the workflow on a test machine first. Start a 30-day trial or request a quote.