Get VMWare Tools of all VMs: Unterschied zwischen den Versionen
Aus QBWiki
Zur Navigation springenZur Suche springen
Pascal (Diskussion | Beiträge) |
Pascal (Diskussion | Beiträge) |
||
| Zeile 3: | Zeile 3: | ||
<syntaxhighlight lang="bash" line="1"> | <syntaxhighlight lang="bash" line="1"> | ||
#!/bin/bash | #!/bin/bash | ||
| − | for i in $(vim-cmd vmsvc/getallvms | | + | for i in $(vim-cmd vmsvc/getallvms | grep -E 'vmx-[0-9]{2}'| grep -oE '^[0-9]{1,4}'); do |
echo "$i : " ; vim-cmd vmsvc/get.guest $i | grep 'toolsVersion = ' | echo "$i : " ; vim-cmd vmsvc/get.guest $i | grep 'toolsVersion = ' | ||
done | done | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Aktuelle Version vom 17. November 2020, 16:51 Uhr
Log into a vsphere host and issue the following command, either separated with ';' or saved as script
1 #!/bin/bash
2 for i in $(vim-cmd vmsvc/getallvms | grep -E 'vmx-[0-9]{2}'| grep -oE '^[0-9]{1,4}'); do
3 echo "$i : " ; vim-cmd vmsvc/get.guest $i | grep 'toolsVersion = '
4 done