Solved

Script to disable Windows Update downloading

Posted on 2014-11-18
3
292 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ejb wildfly example 2 75
NTP problem 24 80
Assignment from incompatible pointer type? 2 41
Mutiple Folder view (5 Folder view) 3 56
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

697 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