After tinkering around with PowerAlert a little more tonight (yeah, I know, it’s Saturday), I stumbled onto some interesting things about the program, and ultimately got it working the way I want.
First, as far as executing command scripts: You need to make sure that the file, even if it’s a CMD or BAT file, has its permissions set properly. PowerAlert attempts to run the scripts as SYSTEM (<LOCALMACHINE>\SYSTEM), so not only did I need to set permissions on the script files to reflect that, I also had to set permissions on psshutdown.exe as well.
After doing that, things worked like a charm. Once the UPS lost power, the monitoring server starts a 2-minute timer. At the end of that 2 minutes, PsShutdown starts, reads a text file containing the names of the servers to shut down, and sends the shutdown command to each one. Plus, if the power would happen to kick back on within those 60 seconds, a second script is run that calls PsShutdown to cancel the previous shutdown commands.
Since our firewalls (we run pfSense) are running on PCs as well, one of the next steps will be to find a utility that can automatically SSH-telnet to each firewall and shut it down as well.
There’s still a couple minor tweaks that I want to do, but they will have to wait until the UPS battery is back up to 100%. For now though, I’m pretty happy that PowerAlert is working like it’s supposed to. AND, I feel a lot better knowing that the servers are going to take themselves down gracefully next time we lose power.