Avatar of matanguay
 asked on

UPS - Auto-Shutdown question


Here is my setup :

I have 12 Servers varying in OS from NT4Server to 2003Server and in hardware from PCServer325 to Xseries server

All the Servers are plugged on UPS but only 6 of them are actually programmed for auto shutdown in case of a power failure, the others would fail and crash after the battery run dead

What I need to do is to find a software that would know there is a power failure and that could send a shutdown command on all the servers without the automatic shutdown.

Right now I use APC Powerchute Business Edition Std ...

Is there any software or combination of software that could execute a command prompt in case a power failure occurs ? if so what is the command line I have to execute to shut the other servers down ???
Operating Systems

Avatar of undefined
Last Comment

8/22/2022 - Mon

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.


First I do not have a ups with network card, and yes I do have some software that came with my card, however not giving me the latitute of remote shutdowning my other servers.

I would like a solution without spending money, like a free software monitoring the UPS, then sending a shutdown command to all other servers.

I just wanted to bring that software to your attention since it is also free software from APC but different than what you have.

I was looking for something with a very similar situation as yours.  I haven't used PowerChute lately but if it has an option to run a batch file on shutdown, then you could use psshutdown from www.sysinternals.com that could fire off before your monitored server went down that would shutdown the rest of your servers.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes

The shutdown bit is easy, as there are loads of links on the web to shutdown scripts and information on them(some systems may already have the necessary code installed):


This site provides you with about the simplest solution to stick in a batch file (this is probably the info you are after?):


This link is also useful:


If you wand a completely free - 'quick shut down' then look here:


The difficult bit is communicating the need to shutdown!

Ideas include:

a.  In your favourite scripting language read the contents of a share on the system concerned, that the PC connected to the UPS, leaves a file in during its shut down process:

net use z: \\otherPC\powerfailshare
copy trigger.txt z:

On each PC to be triggered

check for trigger.txt
if so, shutdown,
else pause 60 secs

In whatever language available

b.  A program running on all systems (an agent) is communicated with by a process on the PC connected to the UPS to tell it to shut down the system? (Hmmm PowerChute Business Edition - ( v. 6.0.2 ) - STD seems to offer this functionality..but over a network)

c. Use a shareware/freeware solutions:

http://www.xpertdesign.de/english/sw_xecutor_info.htm     $15 for commercial use

Enables you to run a script commands on the system attached to the UPS on shutdown (To place those trigger files in shares?)

This may also be of use (shutdown manager):

or ID shutdown manager:

http://www.librarysmith.co.uk/download.php?fl=sdman&Submit=Download (free 2 PC solution)




for details on psshutdown as mentioned by Eagle. Combined with your $15 executor seems to do exactly what you need:)

Hope that helps:)



may also be of intrest as it supports Wake on LAN to restart the systems when power is returned:)


gives the ability to run a script on shutdown for $9.98 (cheaper than executor...but not as 'clean')

I think that's enough to keep you busy - Have fun!! :)
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.

One warning about creating a shutdown script (which you can easily do with a local group policy setting)

Every time you shutdown one of the servers with the script, it will start shutting down all of your other servers.  If the only time your server is shut down is on a power outage then this is fine.

Excellent point!

for the 2k3 servers, have one of the other servers run a script before being automatically shutdown by the ups, the command you are looking for is shutdown. It works with every xp or newer machine, includnig 2003 server. And is on the support cd for 2000 so the file can be put on 2000. Run it as shutdown -m SERVERNAME -s or for more open the command prompt and type shutdown /?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.

All those are great .. these are very good solutions !! .. .. the only problem is that if I go with almost any of your suggested methods, it will shutdown the others servers every time I shutdown the trigger computer.

Is there a UPS monitoring software that can see that the UPS is working on battery and then run any of your commands or suggestions ?? .. ..

I think with this precision that would be the end of this question.

Thanks to all !!

I'm still waiting for some help.

To summarize, I need to have a UPS monitoring software capable of shutting down other servers when the power is down.

I think that either you or we are totally missing the point?

You have 6 servers that already programmed to shutdown. Using any of the above suggesstions, you can get any of these 6 to shut the rest down.
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.

If you're worried about it shutting down the rest when you shut down 1 PC, then you create a seperate link on the desktop to do a direct shutdown...as per the command line options already given, which will avoid any of the triggers concerned.

Otherwise, you need to look at the current software that you are using (APC Powerchute) and find a trigger to run a program from it on receiving a power failure signal. Quote from Powerchute specs for serial connection:

Event Handling
Over 35 Power Events       For each power or environmental event, choose as many as seven different response actions (i.e. page, email, log event, broadcast, run command file, and shutdown).
Paging       Receive timely pages for power and environmental events
Email       Receive timely email alerts for power and environmental events.
Broadcast       Receive timely broadcasts for power and environmental events
Command File       Run a command file to shutdown applications before OS shutdown is initiated

Any of the programable events are capable of triggering what you already want...as is the command file.

If this is not what you've got, then please provide OS of these 6 configured PCs that do shut down, software versions and type, and method of connection, then the experts may be able to be more specific. I have a setup that I should be able to test your requirements on exactly provided enough detail is given.


I checked with my APC Powerchute and there was no trigger at all. All there was was Paging/Email Alert.

How do I find those EVENT HANDLING events ??

Maybe you can run a shutdown script for the rest of the servers and an ABORT shutdown script for the main server. This way, the shutdown sequence will be aborted on the main server.

shutdown -a is the command i think, but you can look this up further.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck

The default UPS is attached to the PC via a serial cable. The able sends information about the state of the UPS. All information about power supply state and UPS status are communicated over this link. All that is required is that this information is received and acted on to perform the tasks you require. The default client provided by the APC powerchute  UPS is fairly limited.

You can download demo versions of the various versions here:


You need the business version to get access to all the triggers.