ESX – Shutdown virtual machines on specific hosts through powershell

We needed a powershell script at work to shutdown specific hosts and there vm at power-failure, this is what I came up with.

Notice: You need to install PowerCLI from VM to get this to work as the script uses PowerCLI as a snapin and if you are planing on using this script on another machine then the VSphere server you need a valid certificate on the VSphere server to get this to work.

Leave a Reply