Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Get HAProxy CA Cert.
# Usage:
# PS> Connect-VIServer $vCenter_Address -Force
# PS> ./get_haproxy_vm_cacert.ps1 $ha_proxy_vm_name
$VMname = $args[0]
$AdvancedSettingName = "guestinfo.dataplaneapi.cacert"
$Base64cert = Get-VM $VMname | Get-AdvancedSetting -Name $AdvancedSettingName
$cert = [Text.Encoding]::Utf8.GetString([Convert]::FromBase64String($Base64cert.Value))
Copy link

gowatana commented Oct 29, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment