Skip to content

Instantly share code, notes, and snippets.

@cetinajero
Last active May 18, 2021 15:47
Show Gist options
  • Save cetinajero/2ac24fd25ed82d2d974520443608a3c8 to your computer and use it in GitHub Desktop.
Save cetinajero/2ac24fd25ed82d2d974520443608a3c8 to your computer and use it in GitHub Desktop.
Power On and Power Off VMs in VMware ESXi 5.5 from the command line

Get a list of your VMs

vim-cmd vmsvc/getallvms

Find the one you’re interested in and check its “power” state

vim-cmd vmsvc/power.getstate [vmid]

Power off

vim-cmd vmsvc/power.off [vmid]

Power on

vim-cmd vmsvc/power.on [vmid]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment