Skip to content
UPSmonitor 247-IT

247-IT Guide

Protecting Hyper-V on Server Core during a power outage

Server Core has no desktop, and many UPS vendor agents require exactly that. How to shut down Hyper-V hosts without a GUI in an orderly way anyway: agentless via WinRM, or with a service on the host itself, operated from a browser.

01 Situation Why Server Core is a special case.

Why Server Core is a special case

Many Hyper-V hosts run as Server Core: fewer updates, a smaller attack surface, fewer resources. Hyper-V Server 2019 was Microsoft's last free edition. Since then, Hyper-V without a desktop means a Server Core installation of Windows Server.

This raises three hurdles for UPS integration:

  1. No user interface — UPS vendor agents often require a desktop or a local console and are not supported, or only partly supported, on Server Core.
  2. USB protects one host only — a host connected via USB learns about the outage, every other host on the same UPS does not.
  3. Order across several hosts — VMs should shut down in a fixed order, and the UPS time budget applies to all hosts together.
02 Architecture Two approaches, neither needs a desktop on the host.

Two approaches without a desktop on the host

Options for Server Core
A: agentless via WinRM B: service on the Core host
Where does monitoring run?on a Windows machine with a desktopas a Windows service on a Core host
Software on the Core hostsnoneonly on the monitoring host
Operationdesktop applicationbrowser on another device
PrerequisiteWinRM on the hostsWinRM on the other hosts

Either way, monitoring queries the UPS over the network (SNMP via a network card, or NUT) and shuts the hosts down via WinRM. That way every host learns about the outage, no matter which UPS outlet it is plugged into.

The monitoring machine must be on the same UPS and keep running until every host has received its shutdown command. If monitoring runs on a host that is itself shut down, that host goes at the end of the order.

03 WinRM Usually already active on Server Core.

Preparing WinRM on the Core hosts

Since Windows Server 2012, remote management is enabled by default. You can check it in the sconfig menu under "Remote management". To be safe, run this in PowerShell as administrator on each host:

Enable-PSRemoting -Force

Then test from the monitoring machine:

# Only needed in workgroups (no domain):
Set-Item WSMan:\localhost\Client\TrustedHosts -Value 'hv-core01' -Force

Test-WSMan hv-core01
Invoke-Command -ComputerName hv-core01 -Credential (Get-Credential) -ScriptBlock { Get-VM }

If the last command returns the VM list, connection, firewall and permissions are fine. WinRM uses TCP port 5985 (HTTP, encrypted via Kerberos or NTLM) or 5986 (HTTPS). HTTPS and certificates are covered in the setup guide.

04 Implementation With the UPS Hyper-V Shutdown Monitor.

Implementation with the UPS Hyper-V Shutdown Monitor

Option A works in every edition: install the UPS Hyper-V Shutdown Monitor on a Windows machine with a desktop, add the Core hosts in the "Hyper-V Hosts" tab and set the order. Nothing is installed on the hosts.

Option B runs directly on a Core host:

  1. "Service only" installation type — setup installs only the Windows service, without the desktop app.
  2. Enable the remote web interface — with the "Service only" installation type, setup preselects the "Enable remote web interface" task. The service is then reachable at https://SERVER:9443/.
  3. First account with a setup token — the service writes a one-time token to C:\ProgramData\UPSHyperVShutdown\web-setup-token.txt. You use it to create the first account in the browser.
  4. Operate in the browser — dashboard, UPS and host configuration, reports and emergency shutdown, over HTTPS with sign-in.

The remote web interface is part of the Enterprise edition and included in the 30-day trial. How to set the VM order and time budget is covered in Shutting down Hyper-V VMs in a power outage.

05 Testing Dry run first, then for real.

Testing the sequence

  1. Connection — run the connection test for each host and retrieve the VM list.
  2. Test mode — trigger a shutdown without sending commands to the hosts. The log shows order and timings.
  3. Real test in a maintenance window — unplug the UPS and check that all VMs shut down cleanly before the hosts power off.
  4. Restart — check that hosts and VMs start in the right order once power returns.
06 Checklist Tool-independent.

Checklist for Server Core

  1. UPS over the network — network card (SNMP) or NUT server instead of USB on a single host.
  2. WinRM on all hosts — connection tested from the monitoring machine.
  3. Account with Hyper-V rights — to stop the VMs and shut the host down.
  4. Monitoring machine on the UPS — and at the end of the order if it is shut down itself.
  5. Order and time budget — fit within the UPS runtime.
  6. Test mode and real test — both done once and documented.
07 Questions Short answers to common questions.

Frequently asked questions

Can Server Core shut down automatically during a power outage?

Yes. A monitoring service queries the UPS over the network (SNMP or NUT) and shuts down VMs and hosts via WinRM. The Core host needs no desktop for this.

Does software have to be installed on the Core host?

Not necessarily. If monitoring runs on another Windows machine, it controls the hosts agentless via WinRM. Alternatively it runs as a service directly on a Core host and is operated from a browser.

Is WinRM enabled by default on Server Core?

Since Windows Server 2012, remote management is enabled by default. Enable-PSRemoting -Force makes sure of it. In workgroups, the monitoring machine must also add the host as a TrustedHost.

How do I operate the software on Server Core without a desktop?

Through the remote web interface of the Enterprise edition: the "Service only" installation type preselects it; read the one-time token from C:\ProgramData\UPSHyperVShutdown\web-setup-token.txt and create the first account at https://SERVER:9443/.

Set up an ordered shutdown yourself

30 days free, every feature included. With test mode and dry run, so the first real power outage is not the first test.