67

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?

Bryansix
  • 815

7 Answers7

51

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

  1. Press Windows Key+R to open the run prompt.
  2. Type "gpedit.msc" and press enter.
  3. In the "Local Group Policy Editor", navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Update.
  4. Enable the "Configure Automatic Updates" policy and set it to "2".
  5. Enable the "No auto-restart with logged on users for scheduled automatic updates installations" policy.
Chaoix
  • 651
24

Finally Microsoft has produced a FIX for this behavior in an update rollup!

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.

voretaq7
  • 80,749
17

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.

http://www.techspot.com/guides/230-prevent-automatic-windows-update-restarts/

Same works with Server 2012. net stop and then stop the service.

TomTom
  • 52,109
  • 7
  • 59
  • 142
9

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

MS KB documenting issue

1

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.

1

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.

0

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.

wondersz1
  • 101