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
Solved

Create a script to automate installing the updates and then restarting of your server.

Posted on 2009-05-12
18
879 Views
Last Modified: 2012-05-06
does anyone have this script automate installing the updates and then restarting  your server.?
I have seen links that talk about this script but never found it.
Thanks
0
Comment
Question by:jskfan
  • 6
  • 6
  • 6
18 Comments
 
LVL 19

Expert Comment

by:PeteJThomas
ID: 24364950
Sorry, I need a little more information?

Are you referring to Automating the install of MS Updates through automatic updates? And configuring this for all the clients in your domain?

If so, this is configured through a group policy setting, there's no need for any scripts. Can you clarify if that is what you mean? If not, is there a particular reason you want to use a script?

Cheers!

Pete
0
 
LVL 19

Expert Comment

by:PeteJThomas
ID: 24364998
Oh and to give you a little more, if you just want to configure auto updates for all your clients as above, then using the Group Policy Management Console, create a new policy, and navigate to:

Computer Configuration > Admin Templates > Windows Components > Windows Update

There are several settings you need to configure in there, the main one being the 'Configure Automatic Updates' setting, which allows you to specify the auto updates behaviour etc, and turns auto updates on for all the clients that this policy applies to.

Once that's created, you simply need to link the policy to a test OU, add a test computer account into that OU, then test it. :)

Pete
0
 

Author Comment

by:jskfan
ID: 24365185
In WSUS Policy, there is an option: Autodownload and Notify for install.
After this is done and you want to install the updates, you will have to do it manually and restart the computers. there should be a script that you can run and will install the updates and restart the computers at your convenience.

I know that there is an option to download and schedule the install, but this will install updates and can reboot the computers after the updates are installed. maybe the reboot will happen during production time and you don't want this to happen.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24365456
I believe the script you are referring to can be found here:
 
http://www.vbshf.com/vbshf/forum/forums/thread-view.asp?tid=199&start=1 
0
 

Author Comment

by:jskfan
ID: 24365578
Can you pinpoint to the script on that link?
0
 
LVL 19

Expert Comment

by:PeteJThomas
ID: 24365588
Ok, so are we referring specifically to servers or to users PC?

As there is also a setting to forcibly DISALLOW the auto restart of computers after an update, and instead, once the updates are installed, the user (if logged on) will be prompted by a message notifying them that a restart is required to complete updates installation, and ask them if they want to install now.

If they say no, then the PC will not restart, and they will be reminded again at an interval you specify (so every 2 hours for example).

However if we're talking about servers only, then obviously it's a different matter, as these are generally unattended so there'd be no one there to accept the restart request...

Can you clarify please?

Many thanks,

Pete
0
 

Author Comment

by:jskfan
ID: 24365803
let's say in WSUS, you will see the updates that haven't been approved/installed for each computer.
It's saturday 11 pm, and I want the updates to be approved/installed and the computers rebooted if the updates require so.

It's almost similar to download and schedule install, let's say you selected the schedule on Sunday at 3 am, this option will start downloading the updates at 3 am on sunday and we don't know how long it takes, then it will start installing the updates and we don't know how long it takes, you might end up having your computers rebooting on Monday during the production time.

so it's better to have a script that install the updates/reboot if required, and it would be really perfect if it reports that some updates require a reboot and the specified computer has n't rebooted, this way I would rather reboot then let it reboot by itself during production time.


0
 
LVL 19

Accepted Solution

by:
PeteJThomas earned 250 total points
ID: 24365925
Ah ok I see, so we're talking about just the servers then. :)

I guess this script would be a nice and easy way to 'manually' update these servers in that case.

Oh and I believe the script is in the thread shown in the screenshot below (at the bottom of the initial post) on dstewartjr's link.



script.JPG
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24365975
That would be the correct spot Pete.
0
 

Author Comment

by:jskfan
ID: 24366671
Cool...
Now where do I need to put the script? is it on the WSUS server?
Do I need to modify anything in the script to match my domain? if so what is needed to be changed.?
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24366705
The original link explains what to change and how to use
0
 

Author Comment

by:jskfan
ID: 24367225
I don't see on the link where it says copy the script to a certaing computer and double-click on it.
I have downloaded this:UpdateHF_v2.6-beta.txt (49KB - 5818 downloads)
now what's the next step?
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24367991
you rename it with .VBS extension and edit the values below
 
sExePath - this is the location of the WindowsUpdateAgent30-x86.exe. Download it from http://go.microsoft.com/fwlink/?LinkId=43264
strMailFrom - arbitrary reply-to address
strMailto - email address you want the report to mail to (this is for manual mode - or if the command-line switch isn't specified).
strSMTPServer - the IP address of the email server you are sending the reports through.
 
0
 

Author Comment

by:jskfan
ID: 24368397
is the script going to be run from the WSUS server or from my workstation will be fine.?
will this:
WindowsUpdateAgent20-x86.exe
be downloaded to a location in WSUS server?

0
 
LVL 47

Assisted Solution

by:Donald Stewart
Donald Stewart earned 250 total points
ID: 24368480
run from anywhere,
 
WindowsUpdateAgent30-x86.exe  <<<(Notice updated version) You download this and modify the " sExePath "   to point to the location where you download it to.

 
0
 
LVL 19

Expert Comment

by:PeteJThomas
ID: 24372280
Many thanks, though dstewartjr was more deserving here as he answered your actual original question. :)

I appreciate it though!

Hope it all works out for you,

Pete
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24388040
You need to learn to accept answers correctly, as PeteJThomas only provided a screenshot of where to click. I not only supplied the link, but walked you thru using the script.
0
 
LVL 19

Expert Comment

by:PeteJThomas
ID: 24389205
dstewartjr is indeed correct - I have a little extra info on this as I've answered two of jskfan's followup questions, which both pertained to using policy instead of the script, so I think he/she went down that route instead, which may be where the confusion came in...

But the fact is, the answer to the question (where is the script?) was not answered by me in this case... :)

Sorry I'm not trying to sound ungrateful!

Good luck all,

Pete
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

856 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