We help IT Professionals succeed at work.
Get Started

Pending Rebot Status on many computers how to clear

278 Views
Last Modified: 2019-12-02
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
                                 l
PSChildName                    : Session Manager
PSProvider                     : Microsoft.PowerShell.Core\Registry
PSComputerName                 : TGCS027-n1
RunspaceId                     : 8b617b75-4131-4b77-b181-f145044acba4

Open in new window



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}

Open in new window


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

Tom
Comment
Watch Question
"Batchelor", Developer and EE Topic Advisor
CERTIFIED EXPERT
Top Expert 2015
Commented:
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE