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).
Finally Microsoft has produced a FIX for this behavior in an update rollup!
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.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.
MS KB documenting issue
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.