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.
Battery backup multiple computers

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.
Enable Low Battery Alarm

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

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

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.


Related posts:
  • How to Remotely Turn OFF Computer from LAN or WAN
  • Battery Information on your Taskbar
  • Windows XP SP2 Laptop Battery Drain Bug