• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 918
  • Last Modified:

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
0
jskfan
Asked:
jskfan
  • 6
  • 6
  • 6
2 Solutions
 
PeteJThomasCommented:
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
 
PeteJThomasCommented:
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
 
jskfanAuthor Commented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Donald StewartNetwork AdministratorCommented:
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
 
jskfanAuthor Commented:
Can you pinpoint to the script on that link?
0
 
PeteJThomasCommented:
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
 
jskfanAuthor Commented:
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
 
PeteJThomasCommented:
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
 
Donald StewartNetwork AdministratorCommented:
That would be the correct spot Pete.
0
 
jskfanAuthor Commented:
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
 
Donald StewartNetwork AdministratorCommented:
The original link explains what to change and how to use
0
 
jskfanAuthor Commented:
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
 
Donald StewartNetwork AdministratorCommented:
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
 
jskfanAuthor Commented:
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
 
Donald StewartNetwork AdministratorCommented:
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
 
PeteJThomasCommented:
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
 
Donald StewartNetwork AdministratorCommented:
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
 
PeteJThomasCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 6
  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now