script to reboot domain computers

Discussion in 'Scripting' started by Sue, Mar 26, 2009.

  1. Sue

    Sue Guest

    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.
    Sue, Mar 26, 2009
    1. Advertisements

  2. 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.
    Pegasus [MVP], Mar 26, 2009
    1. Advertisements

  3. Please ignore my remark about where to post your question. You are, of
    course, in a server-type newsgroup.
    Pegasus [MVP], Mar 26, 2009
  4. In addition to Pegasus' post, check out Sysinternals psshutdown.

    I'd do it nightly.
    Lanwench [MVP - Exchange], Apr 5, 2009
  5. Sue

    Wayne Guest

    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.


    "Lanwench [MVP - Exchange]"
    Wayne, Apr 7, 2009
  6. This means that your machines are well-configured. If it ain't broke, don't
    fix it.
    Pegasus [MVP], Apr 7, 2009
  7. 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
    Lanwench [MVP - Exchange], Apr 7, 2009
  8. "Lanwench [MVP - Exchange]"
    Glad to see a dissenting opinion! It enhances the usefulness of these

    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.
    Pegasus [MVP], Apr 7, 2009
  9. Keheh. You can always count on me for that; you should know that by now. ;-)
    Lanwench [MVP - Exchange], Apr 8, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.