Solved

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

Posted on 2009-05-12
18
884 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

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

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

713 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