I sent out some servers(running server 2008R2 x64) without checking their windows update settings...fail. By default they are set to automatically download and install. I need them to download but not install. Can this be done through command-line? RDP is not an option.
Sure. Download, notify for install:
Check out Group Policy Search for reference if you need to modify other parts of the policy directly via the registry - it's a lot more pleasant than digging through ADMX files.
If the computers are in a domain, you can configure this setting via Group Policy.
Otherwise, you can manually configure the relevant Registry value:
If you have this server in a Domain environment you should do this through a Windows Update group policy. If you do using another method you won't be able to revert this changes with a GPO.
If you are in a non-domain environment you can do the change using the command line. I don't know any tool that let you do this change directly so you will need to do the change modifying the Windows registry.
From a command line you can change the Windows registry using the command
REG ADD
.The registry settings that you need to change are placed on HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU. Particularly the
AUOption
value which is responsible for enabling or disabling the Windows Update setting. If the value is:0
Let the local administrator to choose the settings1
Means never check2
Check but don't download neither install3
Check, download but don't install4
Download and install automaticallyTo run the command that you create in the remote computers you can use the Microsoft Sysinternals command line tool PSExec. You should restart the Windows Update Service using
Net Stop
andNet start
.So you should use something like this:
You can also force a Windows Update check using
Where
Servers.txt
is a simple notepad file with a IP or a server name for each line. If you don't want to use Psexec you can also run theREG
command remotely. ForREG
orPsexec
you will need to have enable the Firewall exeption File and printer sharing and should run the commands with an user account with administrative privileges on the remote servers. See https://stackoverflow.com/q/828432 for more info otherAccess is denied
issues when usingPsexec
.I am a little surprised no one offered the kb: http://support.microsoft.com/kb/328010
figured it out:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f
Reference:
Disable automatic updates from command line