I am Dale Hayter, a Microsoft and VMware certified Technical Consultant.

My blog has been built up over the years from my experience of working on an IT helpdesk and also from being out on-site.

Power on and off Virtual Machines in ESXi Command Line CLI

To Power on and off Virtual Machines in the ESXi Command Line use the commands below :

To get the current state of all virtual machines on a host

vim-cmd vmsvc/getallvms

To list the current power state of a Virtual Machine use the ID from above.

vim-cmd vmsvc/power.getstate VMID

Shutdown a virtual machine

vim-cmd vmsvc/power.shutdown VMID

If the virtual machine fails to shut down, use this command:

vim-cmd vmsvc/power.off VMID

To turn on a Virtual machine use the code

vim-cmd vmsvc/power.on VMID