I have a domain controller with Windows Server 2012 on it. After updates, the server does not reboot immediately. However if I remote into the server I will be presented with a countdown for a reboot. The only options are to restart now or to close the notification. However the countdown still continues and the server eventually reboots without my permission. How can I stop this from occurring?
There is a Local Group Policies you can set to disable the automatic restarts. This should only be done on Windows Servers assuming a sysadmin is going to RDP into the server on a regular schedule and install updates and restart the server (see Patch Tuesday).
- Press Windows Key+R to open the run prompt.
- Type "gpedit.msc" and press enter.
- In the "Local Group Policy Editor", navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Update.
- Enable the "Configure Automatic Updates" policy and set it to "2".
- Enable the "No auto-restart with logged on users for scheduled automatic updates installations" policy.
An update is available that lets you control how the Automatic Updates client applies updates in Windows 8 and Windows Server 2012. After you install this update, the "Configure Automatic Updates" policy setting will work again as it used to in previous Windows operating systems. Instead of installing updates during the daily maintenance cycle, Windows updates will be installed at the time and day that are scheduled in the "Configure automatic updates" policy setting.
Disable the Windows Update service. Not in Service Manager - just stop it. The countdown is from the service, not Windows itself.
If you stop it - no more updates UNTIL the machine is manually restarted.
Same works with Server 2012.
net stop and then stop the service.
Stopping the service isn't enough, as it'll just start itself again. You have to disable the service until you are ready to restart the server.
Then to fix the issue, you'll need to add this registry value to ensure Windows restarts at the scheduled time, even if it is locked.
reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v AlwaysAutoRebootAtScheduledTime /t REG_DWORD /d 1 /f
To stop the reboot temporarily, Disable the Windows Update and Windows Module Installer services. Turn them back on at night so the reboot can happen.
You could use Powershell for installing updates. Do an internet search for the PSWindowsUpate module and download it. Then run the command Get-WUInstall. There's a switch that lets you ignore the request for a reboot. I've been using it on all of my 2012 servers, and I like it a lot better than using the GUI.
If your updates come through WSUS, you can determine which updates require a mandatory reboot of the machine and plan them during a maintenance window. Otherwise disable Windows Update service as suggested above.
protected by Sven♦ May 26 '16 at 17:00
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?