We have a HA Cluster and we're on an Island which experiences frequent power failures. Although we have robust UPS Protection, the batteries will eventually die. I have looked and looked, but have not found a full script to achieve what needs to be accomplished - which is:
1. APC's Powerchute calls a .cmd file that can be used to script a shutdown of multiple servers. So we need to call a Powershell script from a Dos command prompt. How is this done, and exactly what needs to be done to overcome the security measures (i.e. unblock .ps1 files)
2. We can use the shutdown /m \\machinename to shutdown all VMs; is there a better way? If so, exactly what is the script to shutdown ALL VMs on a given cluster without having to specify parameters. (Generic Script)
3. Once the VMs are turned off, the Nodes must be drained - or the cluster stopped, what is the sequence, and the exact command?
4. What is the command to shutdown the nodes?
5. Is there a command that must be run once the nodes are powered back on? What is the command?
One last question:
In the past, we have had to perform the above tasks using the GUI. Whenever we have powered up the Nodes after the shutdown (because of a power failure) , the VMs have not started automatically, when we have set them up to turn on automatically. We look at the "settings" on each VM when this occurs, and they have reset themselves to do "Nothing" for "automatic start action" this is annoying. Why would this be?