Powercli script to shutdown and Poweron VM

By | 14th April 2015

Powercli script to shutdown and start of virtual machine.

This powercli script was created for a specific use case where we needed to shutdown the virtual machine and start it after shutdown is complete.

During the writing of the script found the most important case is how you cleanly shutdown your virtual machine and then wait till it fully stops before starting the virtual machine.

Check –> Shutdown (properly) –> Start VM

The code is available in github.

https://github.com/rajeevrn/myscripts/blob/master/powercli/shutdown_poweron.ps1