VMware: Renew an ESXi host certificate by PowerCli


these are the steps to renew a ESXi Host certificate signed by the vCenter VMCA by PowerCli.

PS D:> Connect-VIServer myVCenter.myDomain.org
PS D:> $oVMHost=Get-VMHost myESXiHost01.myDomain.org
PS D:> $oHostParameters = New-Object VMware.Vim.ManagedObjectReference[] (1)
PS D:> $oHostParameters[0] = New-Object VMware.Vim.ManagedObjectReference
PS D:> $oHostParameters[0].Type = 'HostSystem'
PS D:> $oHostParameters[0].Value = $oVMHost.ExtensionData.MoRef.Value
PS D:> $oCertManager=Get-View -Id CertificateManager-certificateManager

Start the renew process asynchronous

PS D:> $oCertManager.CertMgrRefreshCertificates_Task($oHostParameters)

Or synchronous

PS D:> $oCertManager..CertMgrRefreshCertificates($oHostParameters)


Advertisment to support michlstechblog.info

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.