Disable or Enable Windows Automatic updates from command line

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

 ——-

wuauclt.exe /UpdateNow

——-

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

 ——

from http://www.windows-commandline.com/disable-automatic-updates-command-line/

by admin on November 4, 2009

We can disable Windows automatic updates from command line using the below command.

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

I have tested this on Windows XP, Windows server 2003 and Windows 7 and it works perfectly. After running the above command you can also see a balloon popping up near the system tray with the message “Your computer might be at risk… Automatic updates is turned off……“.

Please note that this will not work if domain group policy is enforced and users are prohibited to change the settings. One can find out if a GP is enforced or not looking at the ‘Automatic updates’ tab in Computer properties(sysdm.cpl). If the options are gryed out, it means that domain GP is enforced.

To enable automatic updates we need to set the registry value to 0. Command is given below.

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

If you want to download updates but not install till the user acts on it then you can set the registy value to 3.

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

If you want to disable Automatic updates service then run the below command.

sc config wuauserv start= disabled

IF you want to stop Automatic updates service then run the below command.

net stop wuauserv

Command for starting automatic updates service:

net start wuauserv

Command for enabling the service:

sc config wuauserv start= auto

Errors:

In Vista/Windows 7, the above commands should be run from elevated administrator command prompt. Otherwise you would get the following error.
c:\>reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f
ERROR: Access is denied.

———

Automatic Updates mit Kommandozeilenoptionen

Es gibt einige dokumentierte und einige undokumentierte Kommandozeilenoptionen um Automatic Updates anzuwenden.
Sie sind hilfreich zur Fehlerbehebung und zum Testen der Client-Computer.

Dokumentierte Optionen

DetectNow

Da die Überprüfung der Clients zeitraubend sein kann, gibt es die Möglichkeit eine Abfrage und den Download von erforderlichen Updates sofort einzuleiten.

wuauclt.exe /detectnow

 

ReportNow

Diese Option gibt die Möglichkeit, einen berichtet des Automatic Update Client innerhalb von wenigen Minuten an den WSUS 3.0 zu senden.

wuauclt.exe /reportnow
wuauclt.exe /r

 

ResetAuthorization

WSUS verwendet Cookies auf dem Client-Computer um verschiedene Arten der Informationen, einschließlich Gruppenmitgliedschaft zu speichern. Das Cookie wird automatisch eine Stunde nach erfolgreichem Update vom WSUS gelöscht. Wenn sie Clientgruppierungen verwenden kombinieren sie die Funktion mit /detectnow damit das Cookie abläuft, eine neue Abfrage eingeleitet wird und WSUS die Gruppenmitgliedschaft aktualisiert.

wuauclt.exe /resetauthorization /detectnow
wuauclt.exe /a

 

Help

Diese Option zeigt die Hilfeinformationen des Automatic Update Client an.
Diese Funktion ist bisher noch nicht aktiv!

wuauclt.exe /? /h /help

 

Nicht dokumentierte Optionen

DemoUI

Mit der undokumentierten Option /DemoUI kann ausprobiert werden, ob die Benachrichtigung über neue Downloads mit Hilfe des Symbols im Systray funktioniert.

wuauclt.exe /DemoUI

 

ShowSettingsDialog

Die undokumentierte Option /ShowSettingsDialog zeigt den Einstellungsdialog «Automatische Updates» an.

wuauclt.exe /ShowSettingsDialog

 

ShowWindowsUpdate

Diese Option öffnet die Microsoft Update Webseite bzw. Windows Update in der Systemsteuerung

wuauclt.exe /ShowWU
wuauclt.exe /ShowWindowsUpdate

 

ShowWindowsUpdate

Diese Option schließt die Microsoft Update Webseite bzw. Windows Update in der Systemsteuerung

wuauclt.exe /CloseWindowsUpdate

 

RunHandlerComServer

Funktion nicht bekannt

wuauclt.exe /RunHandlerComServer

 

RunStoreAsComServer

Funktion nicht bekannt

wuauclt.exe /RunStoreAsComServer

 

ResetEulas

Funktion nicht bekannt

wuauclt.exe /ResetEulas

 

SelfUpdateManaged

Funktion nicht bekannt

wuauclt.exe /SelfUpdateManaged

 

SelfUpdateUnmanaged

Funktion nicht bekannt

wuauclt.exe /SelfUpdateUnmanaged

 

UpdateNow

Funktion nicht bekannt

wuauclt.exe /UpdateNow

20. November 2015 3726 webadmin  General
Total 0 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Add A Knowledge Base Question !

+ = Verify Human or Spambot ?

Add A Knowledge Base Question !

+ = Verify Human or Spambot ?