Pcornel
Automation · Windows Automation

Windows Update Automation

Cheat sheet · https://pcornel.dk/topic.php?topic=5672

Back to the Topic

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 updates
  • UsoClient 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

BoundaryHealthy evidenceSuspicious evidence
Scope / identityExact source revision, hosts and execution identity are explicitSelector drift, stale inventory or wrong token changes scope/authority
OperationTool/provider action and per-host result are traceablePartial failure, hidden error semantics or environment differences are lost
Platform statePersistent and effective state are read backCommand/cmdlet success is mistaken for convergence
Workload proofOriginal service/application acceptance passesAutomation 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

Confirmation

Confirm action

Continue?