Solved

Script to disable Windows Update downloading

Posted on 2014-11-18
3
280 Views
Last Modified: 2014-12-07
Hi

I need a script to disable Windows Updates from downloading updates.  I need the Windows Update service to still be running though as I use a separate Patch Management system.  It is part of a monitoring suite and provides more flexibility.

I have had a look but cannot see anything.

Lots of clients so this would save me a LOT of time.

Thanks in advance.
0
Comment
Question by:heliosit
  • 2
3 Comments
 
LVL 13

Expert Comment

by:Rizzle
ID: 40450380
We disabled Automatic Updates via Group Policy as we also use a 3rd patch management system.

https://social.technet.microsoft.com/Forums/windowsserver/en-US/0a46b8ac-0b16-4b87-a881-260c8d5609f7/disabling-windows-update-via-group-policy
0
 

Accepted Solution

by:
heliosit earned 0 total points
ID: 40478070
Found a vbscript which will do the job
1.' Name:       AUChange.vbs 
2.' Function:   Change the setting for Windows (Automatic) Update 
3.' Usage:      AUChange () 
4.' Returns:    Output according to 1 - 4: 
5.'     1  "Never check for updates" 
6.'      2  "Check for updates but let me choose whether to download and install them" 
7.'      3 "Download updates but let me choose whether to install them" 
8.'      4  "Install updates automatically"  
9.' Modified by Todd Haugland, corrected by Matt Brunmeier 
10.' http://www.gfimax.com 
11. 
12.' Old  way from  www.stackoverflow.com post Const AU_DISABLED = 1 
13. 
14.Dim AUSetting 
15.args = Wscript.Arguments.Count 
16.AUSetting = WScript.Arguments.Item(0) 
17. 
18.if IsNumeric(AUSetting) Then 
19.    'A number was passed in 
20.    if AUSetting > 4 then 
21.        wscript.echo(AUSetting & " is an incorrect value.  You must indicate a value 1 - 4. See script for value explanations") 
22.        wscript.Quit(10001) 
23.    end if 
24.else  
25.    wscript.echo(AUSetting & " is an incorrect argument(s). You must indicate one argument with a value 1 - 4. See script for values") 
26.    wscript.Quit(10001) 
27.end If 
28. 
29.Set objAutoUpdate = CreateObject("Microsoft.Update.AutoUpdate") 
30.Set objSettings = objAutoUpdate.Settings 
31. 
32.objSettings.NotificationLevel = AUSetting 
33.objSettings.Save 
34. 
35.If AUSetting = "1" then 
36.    wscript.echo("Windows Update has been disabled") 
37.    wscript.Quit(0) 
38.elseIf AUSetting = "2" then 
39.    wscript.echo("Check for updates but let me choose whether to download and install them") 
40.    wscript.Quit(0) 
41.elseIf AUSetting = "3" then 
42.    wscript.echo("Download updates but let me choose whether to install them") 
43.    wscript.Quit(0) 
44.else  
45.    wscript.echo("Install updates automatically") 
46.    wscript.Quit(0) 
47.end If 
48. 

Open in new window

0
 

Author Closing Comment

by:heliosit
ID: 40485340
Tested solution and confirmed working.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

OfficeMate Freezes on login or does not load after login credentials are input.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now