Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while read esxi; \
- do ip=$(echo $esxi | awk '{print $1}');fqdn=$(echo $esxi | awk '{print $2}'); \
- thumbprint=$(echo -n | openssl s_client -connect $ip:443 2>/dev/null | openssl x509 -noout -fingerprint -sha1|cut -f 2 -d'='); \
- echo "govc host.add -hostname=$fqdn -folder=/MYDC/host/spare-hosts -dc=MYDC -username=root -password=\$MYPASSS -thumbprint=$thumbprint"; \
- done </tmp/esxi.list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement