Created
February 6, 2018 10:52
-
-
Save csamsel/4a45318fa94394acf124f7250e8fe31c to your computer and use it in GitHub Desktop.
remove invalid VMs from ESXi inventory without vCenter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for a in $(vim-cmd vmsvc/getallvms 2>&1 |grep invalid |awk '{print $4}'|cut -d \' -f2);do vim-cmd vmsvc/unregister $a;done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment