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.