Windows Update PowerShell commands: inventory and checks
Documentation: Microsoft Learn
An example to inspect
Preview the example. Sign in for the full lesson and activities.
Get-HotFix | Select-Object HotFixID, InstalledOnInspect this example’s structure
Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.
Get-HotFix | Select-Object HotFixID, InstalledOn- Stage 1Get-HotFix
Positional values or no named parameters - Stage 2Select-Object
Positional values or no named parameters
Inspect a sample
Example reader
Inspect this page's example
Run supported commands against the practice data, or inspect the example without executing it.
Ready to inspect.
Show reference output
Understand inventory coverage
Get-HotFix queries Win32_QuickFixEngineering and is not a complete inventory of every installer or update mechanism. A missing KB in this result is a reason to inspect the relevant servicing source, not immediate proof that the fix is absent.
Separate discovery from installation
Installed history, available updates and pending restart state answer different questions. Define the target machine, servicing source and collection time in the report. Validate a known update on one machine before applying the query to a fleet.
Evaluate PSWindowsUpdate deliberately
PSWindowsUpdate is a separately maintained module, not a built-in PowerShell engine feature. Review its publisher, package version, help and organizational approval before installation. Use discovery operations first; commands that accept or install updates require a maintenance and restart plan.
Account for managed environments
WSUS, Windows Update for Business and device-management policy can control update availability. A local query or command does not replace those policies. Use the supported management workflow and examine policy or connectivity failures before attempting to override configuration.
Confirm outcome after maintenance
Check installation status in the appropriate source, reboot when the maintenance plan requires it, and validate the application. A single registry reboot indicator cannot establish that every Windows component is free of pending restarts.
Command-line reference
The code above is a reference for your own authorized environment. The Run sample button shows only the stored fictional inspection result.
Read the original documentation
Get-HotFix reference · PSWindowsUpdate package