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".

WindowsupdatesrebootpowershellLow risk
Test-Path the three RebootRequired/RebootPending registry keys shown above; any hit means the machine needs a restart to finish applying changes.

01Command

Command
$ $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

RiskLow risk
!Warning: Deleting these registry keys to fake a clean state is dangerous: the staged changes then apply half-finished at the next boot.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • PendingReboot module
    PowerShell Gallery · community · 2026-09-17
    Evidence: 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