How to stop server 2012R2 and 2008R2 from rebooting after updates auto installed

windows-server-2008windows-server-2012-r2windows-updatewsus

Is there a way to stop server2008R2 / 2012r2 from rebooting after updates auto-installed? I need to manually reboot the servers

I have GPO setup to download and auto-install for updates. and no restart if there is any user logged on. but the thing is there is no user allowed to log into most of servers. so the servers restart itself after scheduled auto-install.

Also I have ADMX templates for Win2012R2 installed on 2008R2 DC, but the settings for auto install wont work.

In the Windows update GPO settings, there is no option just for "DON'T REBOOT AFTER UPDATE INSTALLED"

Any suggestion?

Best Answer

If you want to install automaticcaly your updates without rebooting after, you can apply these registry rules : I show you the results of our GPO because my interface is not in english...

enter image description here

With this configuration, your server will not reboot after an update.

Moreover, if you want to reboot your only after an update and at a time of your choice, you can create a scheduled task at the hour of your choice with a script will verifiy a needed reboot. The script:

$log=(split-path $myinvocation.mycommand.path)+'\logs\reboot.log'

$objSystemInfo= New-Object -com "Microsoft.Update.SystemInfo"
if($objSystemInfo.RebootRequired)
{
    "`r`n" + (get-date -format F) | Out-file -FilePath $log  -Append
    Write "    reboot needed." | Out-file -FilePath $log  -Append
    Write "    /!\ Reboot launched. /!\" | Out-file -FilePath $log  -Append
    Restart-Computer -Force

}