Skip to content

Instantly share code, notes, and snippets.

@manualbashing
Created October 11, 2019 10:51
Show Gist options
  • Select an option

  • Save manualbashing/04cb1da269fbe31dcf7598b329598153 to your computer and use it in GitHub Desktop.

Select an option

Save manualbashing/04cb1da269fbe31dcf7598b329598153 to your computer and use it in GitHub Desktop.
Query an esxi host for the dns name of the vcenter server it is managed by.
$vCenterDnsName = $vmHost.ExtensionData.CLient.ServiceUrl -replace 'https?://(.+?)/sdk','$1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment