1

I'm not sure if this is possible, but this is my goal:

At the end of the day, I want to be able to turn off all the computers in the domain from a client. My account has sufficient privileges to shutdown any single computer remotely using shutdown -I, and I can RDP into any computer in the domain.

However, is there an automated technique that does this? the computers in the domain are predictably named (computer1, computer2, etc), but than manipulating a list of 2000 computers in shutdown -I is pretty clumsy.

Is there a way to shutdown every single computer in the domain from a single client? The domain server is windows 2003, and the clients all run windows xp

thanks

2
  • 1
    Is this a production network? If so, why would you want to do this?
    – joeqwerty
    Dec 6, 2012 at 3:49
  • 1
    I believe /i is interactive. Is this what you really want?
    – MDMarra
    Dec 6, 2012 at 3:53

3 Answers 3

5

You could use script it using PsExec to run shutdown, or you could use PsShutdown:

psshutdown -u <username> -t 0 -k
psexec -d -u <username> shutdown -t 0 -s
1
5

Sure, you could create a scripted scheduled task, or create a script that executes the command via PSExec, for example, but this is an awful idea (so don't).

  1. The most stressful time in a computer's life is during boot up.

    • Daily reboots will wear out your computers and drastically increase hardware failure rates.

  2. When no one's using the computers is the ideal time for maintenance tasks.

    • AV scans, scheduled updates, disk defragmentation, etc.

  3. A much better solution anyway would be to adjust the power settings via GPO.

    • You should use the time do do maintenance, but it's also possible to adjust the PC power settings via GPO so that they hibernate or sleep overnight, which not as hard on the equipment, and better for the users (quicker to resume than do a full boot).
5
  • How does hibernate differ from a powerdown in the context of wear and tear? If the user is concerned about power, sleep would be preferable, though you still have to deal with the drives spinning up and down.
    – Bigbio2002
    Dec 7, 2012 at 18:21
  • Do you have a recent citation (made in the past couple of years, not early 2000s/late 1990s) for "Daily reboots will wear out your computers and drastically increase hardware failure rates."
    – TheLQ
    Dec 12, 2012 at 16:39
  • @TheLQ I don't, but I also don't have a citation from the past couple years that hitting a hard drive with a hammer is bad for the hard drive. Some things just don't change, and electronic components being put under greatest stress at power-on is one of those things. Dec 12, 2012 at 16:47
  • @HopelessN00b I had assumed that the initial power on problem has been minimized or reduced since 15 years ago when this was known as a problem
    – TheLQ
    Dec 12, 2012 at 23:57
  • @HopelessN00b Also consider home use, where a computer might be shut down and restarted multiple times with no problems
    – TheLQ
    Dec 12, 2012 at 23:57
4

Why not just use a group Policy to create a scheduled task to do this? You can even set a parameter on the task to only execute if the machine has been idle for x minutes so that you don't kick off anyone working late.

If you really want to use shutdown.exe, you should use the /m switch to target a remote computer and feed your list to it with a cmd "for" loop or a PowerShell get-content | foreach-object {} from a text list of computers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .