VMware Cloud Community
kirandpesx
Contributor
Contributor
Jump to solution

esxi license key change

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

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

Reply
0 Kudos
4 Replies
rcporto
Leadership
Leadership
Jump to solution

Here is an "updated" version, see: Change ESXi license using PowerCLI » VCDX56

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
kirandpesx
Contributor
Contributor
Jump to solution

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.

Reply
0 Kudos
kirandpesx
Contributor
Contributor
Jump to solution

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.

Reply
0 Kudos