Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Windows Server 2022 / How to Cancel Windows Update Pending Restart Loop

May 6, 2025 Questions and AnswersWindows 11Windows Server 2022

How to Cancel Windows Update Pending Restart Loop

In rare cases, Windows may repeatedly prompt you to restart the computer after installing updates. Moreover, Windows Update continues to display the “Restart required, Pending restart” message no matter how many times you restart a computer.

Windows Update keeps asking to restart

This issue may be caused by a failed Windows Update installation where the update failed to apply changes to the system image and remained in an incomplete (pending) state. Let’s try to cancel the pending update installation and break the update restart loop.

Open a PowerShell console as an administrator and check for any update packages that require the computer to restart (with PendingReboot or InstallPending status). Run the command:

dism /online /get-packages /format:table | Select-String "Pending"

Or this PowerShell command (provides cleaner output):

Get-WindowsPackage -Online | Where-Object { $_.PackageState -like '*Pending*' }

Get-WindowsPackage - pending reboot update

In this example, Windows Update indicates that a restart is required to complete the package installation and to apply the changes. If, after restarting the computer, the component status still shows a pending reboot, you’ll need to cancel the deferred update installation.

Run the command shutdown /f /r /o /t 0 to restart a computer and boot into Windows Recovery environment (or boot from any LiveCD, DaRT recovery disk, or a Windows installation image).

To cancel scheduled updates with a ‘Pending’ status, run the following command (assuming that the Windows partition is assigned the C:\ drive letter )

DISM /image:C:\ /ScratchDir:C: /cleanup-image /RevertPendingActions

This will undo any pending actions from previous Windows Update maintenance operations.

If the DISM command doesn’t help, try manually canceling pending updates by deleting the pending.xml file:

del C:\Windows\WinSxS\pending.xml
del C:\Windows\WinSxS\cleanup.xml (the file may be missing.)
del C:\Windows\SoftwareDistribution\Download\*.* (clear the cache of downloaded updates)

delete pending.xml file to exit endless reboot required

Then run regedit and load the registry hive C:\WINDOWS\system32\config\Software from the offline Windows image.

Navigate to the loaded registry hive, expand HKLM\SYSTEM\CurrentControlSet\Control\Session Manager key and delete the PendingFileRenameOperations parameter.

Clear the PendingFileRenameOperations registry option

Save the changes to the file by unloading the registry hive (File -> Unload hive).

Restart the computer and verify that the pending Windows updates no longer appear in the list.

Then, verify the Windows image integrity and repair the system image files by using the following commands:

DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow

0 comment
0
Facebook Twitter Google + Pinterest
previous post
View Windows Update History with PowerShell (CMD)
next post
Configure NTP Time Source for Active Directory Domain

Related Reading

WMIC Command Not Found on Windows

May 20, 2025

Configuring Windows Protected Print Mode (WPP)

May 19, 2025

Unable to Map Drive: An extended error has...

May 13, 2025

Map a Network Drive over SSH (SSHFS) in...

May 13, 2025

Configure NTP Time Source for Active Directory Domain

May 6, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMware
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Fix: Windows Update Tab (Button) is Missing from Settings
  • Permanently Disable Driver Signature Enforcement on Windows 11
  • Fix: Your IT Administrator Has Limited Access to Virus & Threat Protection
  • Fix: Multiple Connections to a Server or Shared Resources by the Same User
  • How to Add or Reinstall the Microsoft PDF Printer on Windows
  • Configuring Windows Protected Print Mode (WPP)
  • Hardware Graphics Acceleration Causes Visual Glitches in Microsoft Office Apps
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top