Link to home
Start Free TrialLog in
Avatar of jskfan
jskfanFlag for Cyprus

asked on

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

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
Avatar of PeteJThomas
PeteJThomas
Flag of United Kingdom of Great Britain and Northern Ireland image

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
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
Avatar of jskfan

ASKER

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.
Avatar of Don
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 
Avatar of jskfan

ASKER

Can you pinpoint to the script on that link?
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
Avatar of jskfan

ASKER

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.


ASKER CERTIFIED SOLUTION
Avatar of PeteJThomas
PeteJThomas
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That would be the correct spot Pete.
Avatar of jskfan

ASKER

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.?
The original link explains what to change and how to use
Avatar of jskfan

ASKER

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?
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.
 
Avatar of jskfan

ASKER

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?

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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.
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