Skip to content

Instantly share code, notes, and snippets.

@deltapath-eric
Created September 22, 2015 10:40
Show Gist options
  • Select an option

  • Save deltapath-eric/c1dbefc9ce42fb8dacfa to your computer and use it in GitHub Desktop.

Select an option

Save deltapath-eric/c1dbefc9ce42fb8dacfa to your computer and use it in GitHub Desktop.
esxi command
# reboot
vim-cmd vmsvc/getallvms | grep -i HOSTNAME | cut -d ' ' -f 1 | xargs vim-cmd vmsvc/power.reboot
# get ip address
vim-cmd vmsvc/getallvms | grep -i HOSTNAME | cut -d ' ' -f 1 | xargs vim-cmd vmsvc/get.guest | grep ipAddress | sed -n 1p | cut -d '"' -f 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment