Check for a Pending Reboot in the Registry
Detect whether Windows updates, servicing, or installs are waiting for a restart — a common cause of "it worked after I rebooted".
01Command
$ $keys = @(
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired',
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending',
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackagesPending')
$keys | Where-Object { Test-Path $_ }02What it does
Many updates, driver installs, and .NET/DISM operations stage changes and only finish them at boot, leaving marker keys in the registry until then — a machine in this state behaves unpredictably (services fail to start, files stay locked, settings revert). The three classic locations are WindowsUpdate's RebootRequired, Component Based Servicing's RebootPending/PackagesPending, and (for some MSI installs) HKLM:\SOFTWARE\Microsoft\Updates UpdateExeVolatile. The one-liner above reports which markers exist; the community PendingReboot module wraps the full set, including PendingFileRenameOperations, for fleet use. Rebooting clears them — there is no supported way to "cancel" a pending reboot other than completing it.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- PendingReboot moduleEvidence: Documents the well-known pending-reboot registry locations (WindowsUpdate RebootRequired, Component Based Servicing RebootPending/PackagesPending) and packages them into a test module.
Last verified: 2026-09-18 · Category: System & Settings
06Related solutions
List installed applications that have a newer version available, then upgrade selectively.
Search inside text files and logs with regex, returning file, line number and match.
Create or update a .zip from any files or folder contents straight from PowerShell.