PowerCLI Script to Power On or Off vSphere Lab

I was recently chatting to a few guys regarding powering on and off VMs within a vSphere lab and using a script to do so in some sort of controlled manner (or force power off everything if desired). A few of us had a quick search, and couldn’t see anything that met the requirements of being able to power on and power off the lab, as well as place VMs into some sort of priority group.

PowerCLI Script- Configure ESXi Host for Connectivity to Nimble iSCSI SAN

So last week I noticed that a user by the name of Dean had opened a thread on the Nimble Connect forums with some handy PowerCLI to configure an ESXi host to connect to Nimble Storage arrays. I had done the same thing near the end of 2015 when we installed 6 Nimble Storage arrays in our environment, and I was meant to get around to putting it all together in a powershell function/script.