troubleshooting Question

Pending Rebot Status on many computers how to clear

Avatar of Thomas Grassi
Thomas GrassiFlag for United States of America asked on
Windows OSWindows 7Windows 10Windows Server 2012
5 Comments1 Solution359 ViewsLast Modified:
All Windows Platforms  Windows 10  Windows 8.1 Windows 7 Windows 2012 R2, Windows 16, Windows 19

I run a script that reports pending reboots on each computer on my network.
I recently changed this script because the one I was using failed to connect to all my computers.  Needed Remote Registry Service running and other winrm issues.

I discovered this after trying to install Exchange Management Tools on my New Windows 10 Pro computer ,   It keep telling me I had a pending restart.

So after some digging and some help from you guys I found this  value in my registry that caused the problem

"PendingFileRenameOperations"  is the Key

I ran this command against all my computers and this is an example of what I found

PS C:\util> invoke-command -computer SERV027-n1 -scriptblock {Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager'}                                                                           

AutoChkTimeout                 : 10
BootExecute                    : {autocheck autochk /q /v *}
BootShell                      : C:\Windows\system32\bootim.exe
CriticalSectionTimeout         : 2592000
ExcludeFromKnownDlls           : {}
GlobalFlag                     : 0
GlobalFlag2                    : 0
HeapDeCommitFreeBlockThreshold : 0
HeapDeCommitTotalFreeThreshold : 0
HeapSegmentCommit              : 0
HeapSegmentReserve             : 0
InitConsoleFlags               : 0
NumberOfInitialSessions        : 2
ObjectDirectories              : {\Windows, \RPC Control}
ProcessorControl               : 2
ProtectionMode                 : 1
ResourceTimeoutCount           : 150
RunLevelExecute                : {WinInit, ServiceControlManager}
RunLevelValidate               : {ServiceControlManager}
SETUPEXECUTE                   : {}
AutoChkSkipSystemPartition     : 0
PendingFileRenameOperations    : {\??\C:\Users\spadmin\AppData\Local\Temp\TeamViewer\TVFile17.bak_2019-11-20-06-43-56.t
                                 mp, }
PSPath                         : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro
                                 l\Session Manager
PSParentPath                   : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro
PSChildName                    : Session Manager
PSProvider                     : Microsoft.PowerShell.Core\Registry
PSComputerName                 : TGCS027-n1
RunspaceId                     : 8b617b75-4131-4b77-b181-f145044acba4

As you can see the PendingFileRenameOperations" key exists and has a value.

my report returns the SERV027-N1 is TRUE which means the Key exists.

After several restarts on different computers the Key remains.

Of all my computers only two show FALSE no Pending Reboot required.

I can delete the Key manually

I was able to delete the key using powershell

invoke-command -computer SERV001 -scriptblock {reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager" /v PendingFileRenameOperations /f}

Question is why do I need to delete this key?  

A restart of the computer should clear this key correct?

Some install must have failed along the way.

How to I clear this?

Thank you

"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros