Hello,
i checked forum And also did some google
i found below
https://damiankarlson.com/2010/09/06/vsphere-licensing-via-powercli/
But that seems for esxi 4x, so may be with powercli 6x we have a better way to do this ?
I want to change license key for esxi servers in a cluster, anyone Please guide ?
thanks
And you tested that this works with vSphere 6.x ?
I suspect the Get-LicenseDataManager might be a better bet.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Here is an "updated" version, see: Change ESXi license using PowerCLI » VCDX56
And you tested that this works with vSphere 6.x ?
I suspect the Get-LicenseDataManager might be a better bet.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD Thanks
No i did not try that code.
Also your direct look easy one
$viServer = Connect-VIServer -Server 10.23.112.235 $licenseDataManager = Get-LicenseDataManager -Server $viServer $licenseData = New-Object Vmware.VimAutomation.License.Types.LicenseData $licenseKeyEntry = New-Object Vmware.VimAutomation.License.Types.LicenseKeyEntry $licenseKeyEntry.TypeId = "vmware-vsphere" $licenseKeyEntry.LicenseKey = "00000-11111-11111-11111-11111" $licenseData.LicenseKeys += $licenseKeyEntry $hostContainer = Get-Datacenter -Name Datacenter1 $licenseDataManager.UpdateAssociatedLicenseData($hostContainer.Uid, $licenseData)
Associates new license data with Datacenter1. The license data holds single license key entry suitable for licensing vSphere hosts.
LucD strangely not many script on this forum for this cmdlet
i found 1
"Corrected" Steps to Set Up Bulk Licensing (Fixed Manual Typo)
i have not tested anyways as i already applied the keys manually for now.
