Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

6 Answers 6

If the computers are in a domain, you can configure this setting via Group Policy.

Otherwise, you can manually configure the relevant Registry value:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\AUOptions
  1. Don't check
  2. Check but don't download
  3. Download but don't install
  4. Download and install
share|improve this answer
    
Is use of this key documented? –  Harry Johnston Oct 19 '11 at 23:15

Sure. Download, notify for install:

reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /v AUOptions /t REG_DWORD /d 3

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.

share|improve this answer
1  
That key simulates Group Policy behaviour, i.e. it locks the setting so that it may not be modified via GUI. This may or may not be what you want. The key I described is the actual one controlling the setting. –  Massimo Oct 18 '11 at 20:04
    
@Massimo Indeed, good point. –  Shane Madden Oct 18 '11 at 21:13

If you have this servers in a Domain enviroment you should do this throught a Windows Update group policy. If you do using another method you wont be able to revert this changes with a GPO.

If you are in a non domain enviroment 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. Particulary the AUOption value wich is the resposable of enable, or disable the Windows Update setting. If the value is:

0 Let the local administrator to choose the settings

1 Means never check

2 Check but don't download neither install

3 Check, download but don't install

4 Download and install automatically

To 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 and Net start.

So you should use something like this:

psexec.exe \\@Servers.txt net stop "Automatic Updates"
psexec.exe \\@Servers.txt REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions REG_DWORD /d 00000004
psexec.exe \\@Servers.txt net start "Automatic Updates"

You can also force a Windows Update check using

psexec.exe \\@Servers.txt WUAUCLT /DETECTNOW

Where Servers.txt is a simple notepad file with a IP or a server nme for each line. If you dont want to use Psexec you can also run the REG command remotely. For REG or Psexec 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.

share|improve this answer

I need them to download but not install. Can this be done through command-line?

You could use the command line tool wuinstall. with that you can download windows updates without installing them. the command would be for example wuinstall /download here you can see the features and explanation of the free version: link

share|improve this answer

I am a little surprised no one offered the kb: http://support.microsoft.com/kb/328010

share|improve this answer
    
Possibly because SE, in general, prefers answers are more than just links. –  jscott Sep 5 '13 at 19:11

figured it out:

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f

Reference:

http://www.windows-commandline.com/2009/11/disable-automatic-updates-command-line.html

share|improve this answer
    
That's exactly what my answer said... –  Massimo Oct 20 '11 at 5:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.