On this page
How Windows sees a UPS
Most consumer and small business UPS units with a USB port, including common APC, CyberPower, Eaton and Tripp Lite models, implement the USB HID Power Device class. It is the same class used by laptop batteries, so Windows loads its own driver and treats the UPS as a system battery. Three things then appear:
- A battery icon in the taskbar with a charge percentage and "plugged in" or "on battery" state.
- An entry under Batteries in Device Manager, typically named something like "HID UPS Battery" alongside "Microsoft AC Adapter".
- Battery settings in Power Options with separate On battery and Plugged in columns.
That last item is what you use. When the UPS goes on battery, Windows switches to the On battery column and acts on its thresholds exactly as a laptop would.
The data cable matters
Some UPS units ship with a USB cable that has an unusual connector at the UPS end, or with an RJ45-to-USB cable. A random USB cable or a serial cable will not work on a USB HID port. If no battery appears in Device Manager, check the cable, then see UPS not detected by computer.
Step by step: configure the critical battery action
The Windows 11 Settings app exposes only a small part of the power configuration and does not show the critical battery action. Use the classic Control Panel applet, which is still present in recent versions of Windows 10 and 11.
- Confirm detection. Open Device Manager and expand Batteries. You should see the UPS battery entry. If you only see Microsoft AC Adapter, Windows is not receiving UPS data.
- Open advanced power settings. Press Win+R, type
powercfg.cpl, press Enter, then choose Change plan settings next to the active plan and Change advanced power settings. - Expand Battery. If there is no Battery section, Windows has not detected a battery and the rest will not work.
- Set Low battery level and Low battery action. For On battery, set a level such as 60% with action Do nothing. Windows shows a notification at this point, which serves as an early warning.
- Set Critical battery level. For On battery, start at 40 to 50% on a desktop. You will refine it after testing.
- Set Critical battery action. For On battery, choose Shut down or Hibernate. Leave Plugged in at Do nothing.
- Apply, then repeat for any other power plan you switch between, because thresholds are stored per plan.
The same settings from the command line
On machines you manage remotely, powercfg can set the same values. The aliases below apply to the current plan; /setdcvalueindex sets the On battery value.
REM Critical battery action on battery: 0 = Do nothing, 1 = Sleep, 2 = Hibernate, 3 = Shut down
powercfg /setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONCRIT 3
REM Critical battery level on battery, in percent
powercfg /setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATLEVELCRIT 45
REM Low battery level (notification) on battery, in percent
powercfg /setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATLEVELLOW 60
REM Apply the changes to the active plan
powercfg /setactive SCHEME_CURRENT
REM Check what Windows reads from the UPS
powercfg /batteryreport
Run these from an elevated prompt. To list every setting and its current value, use powercfg /query SCHEME_CURRENT SUB_BATTERY. The alias names are long established, but if one is rejected on your build, the query output shows the GUIDs you can use instead.
Shut down or hibernate?
| Action | What happens | Best for | Watch out for |
|---|---|---|---|
| Shut down | Apps are asked to close, then Windows powers off | Unattended PCs, servers, anything running background jobs | Unsaved documents may block or be lost if an app prompts and nobody answers |
| Hibernate | Memory is written to disk, then the PC powers off; the session resumes later | Workstations with open work | Writing memory to disk takes time on large-RAM systems; hibernate is often disabled on desktops |
| Sleep | PC stays powered at very low draw | Not recommended on UPS | Sleep still draws from the battery; when it empties, the session is lost |
If Hibernate is missing from the list, enable it from an elevated prompt with powercfg /hibernate on. Some desktops with certain power configurations still hide it; check that the hibernation file was created and that the option now appears.
Rule of thumb: set the critical level by time, not by habit
A UPS percentage is not a fuel gauge. It is the UPS's estimate, and at high load or with an aging battery the last 30% can disappear far faster than the first 30%. Our approach: run a test at your normal load, note how many minutes it takes to reach your chosen critical level, and make sure the remaining runtime after that point is at least twice as long as your shutdown takes. If a shutdown takes 90 seconds, you want at least 3 minutes left at the trigger point.
Test it properly
A configuration you have never tested is a hope. The test is simple, but do it at a convenient time with work saved.
- Make sure the UPS battery is fully charged (leave it on line for several hours after any previous discharge).
- Save everything, leave the PC running its typical load, and note the time.
- Unplug the UPS input cord from the wall. Do not switch the UPS off with its button, because that cuts the output too.
- Watch the battery percentage in the taskbar. Note when the low battery warning appears and when the shutdown begins.
- Once Windows has shut down, plug the UPS back in and note how long the shutdown took and roughly how much runtime the UPS display still reports.
If the shutdown never triggers, Windows may not be getting updated percentages from the UPS. A full runtime test also stresses the battery a little, so do not repeat it weekly. Twice a year, and after a battery replacement, is a sensible cadence. See self-tests and runtime calibration.
Limits of the built-in approach
Windows' battery handling was designed for laptops, so it has gaps for UPS use:
- One machine only. Only the PC connected by USB knows the UPS state. A second PC, a NAS or a switch on the same UPS gets no signal.
- Percentage triggers only. There is no built-in "shut down after X minutes on battery" or "shut down when runtime is below Y minutes".
- No UPS controls. You cannot silence alarms, schedule self-tests, change sensitivity or tell the UPS to turn its outlets off after shutdown.
- Minimal logging. Power transitions are not recorded in a way that is easy to review later.
| Your situation | Better tool |
|---|---|
| One home PC, short outages, just want a safe shutdown | Built-in Windows battery settings |
| Want runtime-based thresholds, logs and UPS settings | Vendor software: PowerChute or PowerPanel |
| Several computers or a NAS on one UPS | A NUT server on one machine with Windows NUT clients, or vendor network shutdown software |
| Rack UPS with a network card | Vendor network shutdown agents or SNMP; see network management cards |
Network UPS Tools has no official native Windows client in the main distribution, but community clients exist (WinNUT-style tools) that connect to a NUT server and trigger a shutdown. Check that any such tool is maintained and supports your NUT server version before relying on it.
Avoid two programs fighting over the UPS
Installing vendor software usually takes over the USB connection. If you install PowerChute or PowerPanel, configure shutdown there and leave the Windows critical action as a backup at a lower level, so the two do not race each other.
Bringing the PC back after the outage
After Windows shuts down, many UPS units keep their outlets powered until the battery runs out, and a PC that is off draws only a small standby current. When mains power returns before the battery empties, the outlet never lost power, so a "power on after AC loss" BIOS setting never fires. If you need the PC to restart on its own, vendor software that commands the UPS to cut its outlets after shutdown solves this, as does NUT's shutdown sequence. On a personal desktop, pressing the power button after the outage is usually fine.
Frequently asked questions
Why does Windows show my desktop PC as having a battery?
Because the UPS identifies itself over USB as an HID Power Device, the same device class laptop batteries use. Windows then shows a battery icon, a charge percentage and battery settings in Power Options. That is expected, and it is exactly what makes built-in shutdown work.
Do I need PowerChute or PowerPanel on Windows?
Not for a basic shutdown of one PC. Vendor software adds runtime-based thresholds, event logs, self-test scheduling, UPS settings such as sensitivity and alarm control, and sometimes shutdown of other computers over the network. If you only need one PC to shut down cleanly, the built-in battery settings are often enough.
What critical battery level should I set for a UPS?
Set it high enough that the shutdown finishes with spare runtime. As a starting point, 40 to 50% suits most desktops, then confirm by timing a real test. Avoid the laptop default of a few percent: the UPS estimate can drop sharply near the end, and older batteries collapse faster than the percentage suggests.
Will my PC turn back on when power returns?
Only if the BIOS or UEFI is set to restore power after AC loss and the UPS actually cuts and restores its output. Many UPS units keep their outlets on until the battery is depleted, so after Windows shuts down the PC may stay off. Look for an AC power recovery or restore on AC power loss setting in firmware.
Can Windows shut down when the UPS has been on battery for a set time?
Not with the built-in settings, which only react to percentage levels. For a time-on-battery trigger, use vendor software or a Network UPS Tools client for Windows. Some administrators use Task Scheduler with power events, but that is a workaround rather than a supported UPS feature.
Sources and further reading
- Microsoft Learn: Windows power management and battery documentation
- Microsoft Learn: Powercfg command-line options
- USB Implementers Forum, Usage Tables for HID Power Devices
- Network UPS Tools project documentation