Solved

Script to disable Windows Update downloading

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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

A safe way to clean winsxs folder from your windows server 2008 R2 editions
This article explains how to install and use the NTBackup utility that comes with Windows Server.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

724 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