I would like to configure my servers to shutdown Windows via a script without actually turning the systems off.
-
5Why do you want this behavior? – voretaq7 Mar 08 '12 at 19:03
-
I am using a UPS for several servers. I want them to shutdown when told to from the UPS, but I want them to remain on so that when the power is cut, their last state was “on” and therefore they will turn themselves back on when power is restored. – Corey Mar 08 '12 at 19:19
-
11Servers (and decent motherboards) have a setting to automatically come back when the power comes back. – TomTom Mar 08 '12 at 19:24
-
6+1 - Even every desktop grade Dell I've ever seen has the relevant setting in BIOS. – Robin Gill Mar 08 '12 at 20:09
-
It's just a simple "can this be done" question. Why all the negativity? – Corey Apr 19 '12 at 12:42
-
@Corey http://xkcd.com/463/ <-- Same line of thought. – Chris S Apr 19 '12 at 12:49
2 Answers
Software for most UPSs will manage this. You configure the system to turn on after a shutdown, often after a certain percentage of battery charge is recovered. This means that if there is a second second power event, the system will have had time to fully power up and then power down again. I usually set this to 40% but it depends on the load.

- 4,514
- 22
- 31
- 30
PsShutdown is a command-line utility similar to the shutdown utility from the Windows 2000 Resource Kit, but with the ability to do much more. In addition to supporting the same options for shutting down or rebooting the local or a remote computer, PsShutdown can logoff the console user or lock the console (locking requires Windows 2000 or higher). PsShutdown requires no manual installation of client software.
psshutdown -s

- 2,031
- 12
- 39
- 54
-
According to TechNet, the -s switch shuts Windows down without powering the system off. I think that's exactly what he wanted. – JohnThePro Apr 19 '12 at 14:09