An uninterruptible power supply (UPS), also known as a battery backup is a device which maintains a continuous supply of electric power to connected equipment by supplying power from a separate source when utility power is not available. Usually there is at least 2 output for you to protect your computer and monitor from unexpected power disruption and then there is one USB interface port for you to connect to the computer. I am using APC BACK-UPS RS 800VA 230V, there are 2 surge protection and 4 battery backup outputs.

The USB connection is for the UPS to tell the computer how much power is left on the battery. It is important to connect the UPS to the computer and configure it to automatically shut down the computer when battery power reaches a low level. This way you won’t risk your files being corrupted or even an unbootable system.
Usually there is only one communication interface port on a UPS. Does that mean you can only give backup power to one computer with one UPS? What if you have two or more computers? Yes, you can connect up to 4 computers to the UPS output, but only one computer is able to properly shutdown. The rest will also shutdown BUT it is done without first performing any proper shut-down procedure. This can severely damage the filesystem! Well I thought of a way which makes it possible for one UPS to provide backup power for 2 or more computers and you can shut down all your computers properly when battery reaches low level.
Remember the article “How to remotely turn off computer from LAN or WAN” that I wrote yesterday? We can use Poweroff batch command line to shut down multiple computers. When you have a working poweroff batch file, just configure Windows alarm action to run the batch file when it reaches low power level.
Here’s the step on how to shut down multiple computers when your UPS battery reaches low level.
1. Open notepad
2. If you want to connect 4 computers to the UPS, you need to write 4 lines in the batch file to shut down all 4 computers. The only thing you need to change in the command below is the computer name/IP, the port(if you’re using the default port), and password.
poweroff poweroff -force -remote PC1 -port 3210 -password MyPASS
poweroff poweroff -force -remote PC2 -port 3210 -password MyPASS
poweroff poweroff -force -remote PC3 -port 3210 -password MyPASS
poweroff poweroff -force -remote PC4 -port 3210 -password MyPASS
NOTE: You must install Poweroff service on all 4 computers. Refer to yesterday’s article on how to do that. Also, the computer that is running this batch file must be last in line at the batch file.
3. Save it to where Poweroff is located with the filename shutdown.bat
4. Go to Control Panel and run Power Options
5. Click Alarms tab
6. Check “Activate low battery alarm when power level reaches:” and click Alarm Action button.

7. Check When the alarm occurs, run this program: and click Configure program button.

8. Browse for the shutdown.bat file. Click Set password button if you password is required to login to Windows.

9. Click OK to close Low Battery Alarm Program, click OK to close Low Battery Alarm Actions.
The above configuration will allow your computer to remotely shutdown PC1, PC2, PC3 and finally PC 4(own computer) using Poweroff when your UPS reached LOW battery level.
I’d advice you to set the Low battery alarm level to 20% so that there will be enough time for all the computer to properly shut down before the battery power runs out.
Important Note: It doesn’t mean that if the UPS has 4 outputs, you can connect 4 computers. Your total output power capacity for the 4 computer mustn’t be over the UPS output power capacity. If it goes over, the Overload LED will lit up and there is a chance that it’ll damage the UPS.

If there is no “Alarms” tab under Power Options, you can use a third-party utility which adds command line functionality to later versions of PowerChute Personal Edition. The file and instructions are published at forums.isxusergroups.com/thread.jspa?threadID=7055
Missing Alarms tab under Power Options, is there another way to achieve multiple pcs being shutdown by Poweroff?
Once I tried to connect two computer through one UPS but something went wrong and my both computers were crashed . But finally from this blog I understood the whole concept properly.
Thanks for the info.
How do I do this with Windows 7 / Server 2008 R2?
I cannot find a way to run a command/batch script when the battery level is low/critical?
well and nice
hur gör men ett larm
Hi,
I have installed poweroff in both the local (attached to a UPS) and the remote computer (which I would like to shutdown from the local), but now I don’t know how to run the command batch on the local, since not Alarms tab is found in the Power Options Control Panel.
Any help? Thanks in advance.
Xabier.
I also just used that program to create a batch file to turn off my monitors for my MCE2005 box. I put a shortcut to it in the “more programs” list so I can navigate to that to shut my monitors off if I’m laying down while watching TV through MCE.
The batch file consists only of this:
poweroff monitor_off
There was another workaround for MCE using a different style program. This one is much better since it doesn’t minimize MCE while shutting off the monitors.
Thank you for this article! I was looking for a way to have my main PC and Windows Home Server box protected with one UPS.
Poweroff installs and runs fine on WHS; thank you again!
Nice blog.. and nice idea..!
thanks
Thanks Ray!