Solved

Script to disable Windows Update downloading

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
OfficeMate Freezes on login or does not load after login credentials are input.
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…
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…

803 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