Windows Update Automation
Cheat sheet · https://pcornel.dk/topic.php?topic=5672
Answer
Windows Update Automation coordinates update discovery, approval/source, download/install, reboot handling and post-update verification across Windows hosts.
Remember
- Scan completed ≠ required update applicable or approved.
- Update installed ≠ rebooted runtime uses updated components.
- Reboot completed ≠ service/workload healthy.
- No updates available ≠ endpoint fully patched if policy/source is wrong.
First checks
Get-WindowsUpdate (PSWindowsUpdate module)— pending updatesUsoClient StartScan— trigger scan (client)- WSUS/Intune/Azure Update Manager compliance — reports
Verify in this order
policy → update service → install → reboot → report
Where it usually breaks
Windows Update result does not prove updated components are active or the workload remains healthy until post-reboot verification passes.
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Windows Update Automation automation proof-boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Scope / identity | Exact source revision, hosts and execution identity are explicit | Selector drift, stale inventory or wrong token changes scope/authority |
| Operation | Tool/provider action and per-host result are traceable | Partial failure, hidden error semantics or environment differences are lost |
| Platform state | Persistent and effective state are read back | Command/cmdlet success is mistaken for convergence |
| Workload proof | Original service/application acceptance passes | Automation summary substitutes for actual runtime behavior |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5672