Windows Server 2012 R2 w/ GUI, UPS system
I am setting up my first server. It is a Hyper-V host that will host multiple VM servers. The system is on a UPS.
When the UPS detects an AC power failure, the UPS sends an email via an SMTP mail server located elsewhere, and then performs a graceful server shutdown if power is not restored after a certain period of time. When the power is restored, the host machine BIOS is setup to automatically reboot.
I'd like to get emails from the various servers that they have rebooted after power is restored. My UPS doesn't send emails upon AC restore, but even if it did, that wouldn't tell me the servers were back up. I'd like each server to send an email after it is back online.
What steps/methodologies need to be used to accomplish this? By methodologies I mean to ask if I need to write a script, or is there a built-in tool to accomplish this, etc?
I have the SMTP server info, ports, log in credentials, etc. to send an email, I just don't understand how to make a server do that upon power up, or what the standard/best practice is for such notification to normally be handled.