Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > script to reboot domain computers

Reply
Thread Tools Display Modes

script to reboot domain computers

 
 
Sue
Guest
Posts: n/a

 
      03-26-2009
Hi, I would like to know if anyone has a script to reboot all computers
except the Server, at 1 am on a Sunday?
This would help me so much because the workers never reboot, cause weird
errors after a while.


 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a

 
      03-26-2009

"Sue" <> wrote in message
news:...
> Hi, I would like to know if anyone has a script to reboot all computers
> except the Server, at 1 am on a Sunday?
> This would help me so much because the workers never reboot, cause
> weird errors after a while.


Here are a couple of ways to do this:

- Use the Task Scheduler on your server to run a batch file that
does two things:
* It pings each PC.
* It uses shutdown.exe to reboot those than can be reached.

- Use schtasks.exe on your server to create a scheduled task
on each machine to invoke shutdown.exe at 1am each Sunday.

By the way, this is really a server issue. A server issue would be a much
better place to post this question.


 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      03-26-2009

"Sue" <> wrote in message
news:...
> Hi, I would like to know if anyone has a script to reboot all computers
> except the Server, at 1 am on a Sunday?
> This would help me so much because the workers never reboot, cause
> weird errors after a while.


Please ignore my remark about where to post your question. You are, of
course, in a server-type newsgroup.


 
Reply With Quote
 
Lanwench [MVP - Exchange]
Guest
Posts: n/a

 
      04-05-2009
Sue <> wrote:
> Hi, I would like to know if anyone has a script to reboot all
> computers except the Server, at 1 am on a Sunday?
> This would help me so much because the workers never reboot, cause
> weird errors after a while.


In addition to Pegasus' post, check out Sysinternals psshutdown.

I'd do it nightly.


 
Reply With Quote
 
Wayne
Guest
Posts: n/a

 
      04-07-2009
Not wanting to hijack this thread, but what is the general consensus to
reboots of servers/workstations?

We tend to leave boxes up and running for months without restarts.

Cheers
Wayne.


"Lanwench [MVP - Exchange]"
< hoo.com> wrote in message
news:uwSUL%...
> Sue <> wrote:
>> Hi, I would like to know if anyone has a script to reboot all
>> computers except the Server, at 1 am on a Sunday?
>> This would help me so much because the workers never reboot, cause
>> weird errors after a while.

>
> In addition to Pegasus' post, check out Sysinternals psshutdown.
>
> I'd do it nightly.
>


 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      04-07-2009

"Wayne" <Wayne@/\/\TServices.co.uk> wrote in message
news:OoS%...
> Not wanting to hijack this thread, but what is the general consensus to
> reboots of servers/workstations?
>
> We tend to leave boxes up and running for months without restarts.
>
> Cheers
> Wayne.


This means that your machines are well-configured. If it ain't broke, don't
fix it.


 
Reply With Quote
 
Lanwench [MVP - Exchange]
Guest
Posts: n/a

 
      04-07-2009
Pegasus [MVP] <> wrote:
> "Wayne" <Wayne@/\/\TServices.co.uk> wrote in message
> news:OoS%...
>> Not wanting to hijack this thread, but what is the general consensus
>> to reboots of servers/workstations?
>>
>> We tend to leave boxes up and running for months without restarts.
>>
>> Cheers
>> Wayne.

>
> This means that your machines are well-configured. If it ain't broke,
> don't fix it.


I disagree. I've got startup and shutdown scripts on all domain workstations
that do all sorts of things and I want them running regularly. I want to
make sure that misbehaving applications aren't hogging memory. I ask all my
users to restart before they leave the office for the day - it's easier to
remember to do the same thing every day rather than "log out M-Th, reboot
Friday."


 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      04-07-2009

"Lanwench [MVP - Exchange]"
< hoo.com> wrote in message
news:...
> Pegasus [MVP] <> wrote:
>> "Wayne" <Wayne@/\/\TServices.co.uk> wrote in message
>> news:OoS%...
>>> Not wanting to hijack this thread, but what is the general consensus
>>> to reboots of servers/workstations?
>>>
>>> We tend to leave boxes up and running for months without restarts.
>>>
>>> Cheers
>>> Wayne.

>>
>> This means that your machines are well-configured. If it ain't broke,
>> don't fix it.

>
> I disagree. I've got startup and shutdown scripts on all domain
> workstations that do all sorts of things and I want them running
> regularly. I want to make sure that misbehaving applications aren't
> hogging memory. I ask all my users to restart before they leave the office
> for the day - it's easier to remember to do the same thing every day
> rather than "log out M-Th, reboot Friday."


Glad to see a dissenting opinion! It enhances the usefulness of these
newsgroups.

As an overall remark to the OP: Since this is not really a scripting issue,
it should be posted in a general server newsgroup. You are likely to get
more responses there.


 
Reply With Quote
 
Lanwench [MVP - Exchange]
Guest
Posts: n/a

 
      04-08-2009
Pegasus [MVP] <> wrote:
> "Lanwench [MVP - Exchange]"
> < hoo.com> wrote in
> message news:...
>> Pegasus [MVP] <> wrote:
>>> "Wayne" <Wayne@/\/\TServices.co.uk> wrote in message
>>> news:OoS%...
>>>> Not wanting to hijack this thread, but what is the general
>>>> consensus to reboots of servers/workstations?
>>>>
>>>> We tend to leave boxes up and running for months without restarts.
>>>>
>>>> Cheers
>>>> Wayne.
>>>
>>> This means that your machines are well-configured. If it ain't
>>> broke, don't fix it.

>>
>> I disagree. I've got startup and shutdown scripts on all domain
>> workstations that do all sorts of things and I want them running
>> regularly. I want to make sure that misbehaving applications aren't
>> hogging memory. I ask all my users to restart before they leave the
>> office for the day - it's easier to remember to do the same thing
>> every day rather than "log out M-Th, reboot Friday."

>
> Glad to see a dissenting opinion! It enhances the usefulness of these
> newsgroups.


Keheh. You can always count on me for that; you should know that by now. ;-)
>
> As an overall remark to the OP: Since this is not really a scripting
> issue, it should be posted in a general server newsgroup. You are
> likely to get more responses there.


Ayup.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shutdown and reboot all domain computers nobody Scripting 2 11-05-2007 08:55 AM
shutdown or reboot all domain computers nobody Windows Server 4 10-29-2007 01:50 AM
Given a list of domain computers - how can I script the placement of these computers into a specific OU? Spin Active Directory 2 08-30-2006 11:01 PM
Reboot all Computers in Domain? Jared Bassett Windows Server 5 02-11-2005 04:58 PM
Reboot all Computers in Domain? Jared Bassett Server Networking 5 02-11-2005 04:58 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59