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