Skip to content

Instantly share code, notes, and snippets.

@mikebranstein
Created September 1, 2016 20:26
Show Gist options
  • Save mikebranstein/7e9169000a6555c195043e1755fbee7e to your computer and use it in GitHub Desktop.
Save mikebranstein/7e9169000a6555c195043e1755fbee7e to your computer and use it in GitHub Desktop.
Disables Windows Update with PowerShell
# set the Windows Update service to "disabled"
sc.exe config wuauserv start=disabled
# display the status of the service
sc.exe query wuauserv
# stop the service, in case it is running
sc.exe stop wuauserv
# display the status again, because we're paranoid
sc.exe query wuauserv
# double check it's REALLY disabled - Start value should be 0x4
REG.exe QUERY HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv /v Start
@gyanu89
Copy link

gyanu89 commented Feb 12, 2018

Hi,
above code is for disable windows update service , could you please help me in to set windows automatic update setting as " Never check for update ( not recommended) " remotely on multiple 2008 / 2012 servers
Any help will be appreciated.

@sovetov
Copy link

sovetov commented May 18, 2018

@gyanu89 locally try:

Excerpt from https://blogs.technet.microsoft.com/jamesone/2009/01/27/managing-windows-update-with-powershell/

$AUSettings = (New-Object -com "Microsoft.Update.AutoUpdate").Settings
$AUSettings.NotificationLevel = 1
$AUSettings.Save

Meaning of levels: https://msdn.microsoft.com/en-us/library/windows/desktop/aa385806(v=vs.85).aspx

Hope it can me transformed for remote machines.

@upggr
Copy link

upggr commented Aug 1, 2019

Note that a space is required between the option value and the sign :
sc.exe config wuauserv start= disabled

@Fikshan
Copy link

Fikshan commented Jan 7, 2021

Very useful link :

how to start service back after disabled : sc.exe config wuauserv start=auto

If you need to see Description of command : sc.exe config start wuauserv

@IT-Specialist-IN
Copy link

@WindowsEngineer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment