Solved

Script to disable Windows Update downloading

Posted on 2014-11-18
3
247 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

706 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

18 Experts available now in Live!

Get 1:1 Help Now