VMware Cloud Community
sherlock_holmes
Contributor
Contributor

Bulk licensing: With Multiple keys?

Hello Everyone,

I have setup bulk licensing for ESXi host using the steps mentioned on the VMware discussion (https://communities.vmware.com/thread/328173). Its working well with a single license key but wanted to know if there is a way to add multiple license keys to the bulk licensing so that if one of the keys is exhausted than another key can be picked up automatically.

The “LicenseKeyEntry” object takes in a pair value <typeid, licensekey> where typeid is “vmware-vsphere”. I tried to enter multiple keys with same typeid but did not work. Also tried changing the type id to something else (like “vmware-2”) for a new key but I think the typeid has to “vmware-vsphere” and got errors. Since the script (above link) has $licenseData.LicenseKeys += $licenseKeyEntry, I think there should be a way to attach multiple keys.

Just wanted to know if anyone has a workaround for this?

Thank you

0 Kudos
2 Replies
LucD
Leadership
Leadership

Did you try adding the licenses one by one in a ForEach loop ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
sherlock_holmes
Contributor
Contributor

Yes, I did it try it and $licenseDataManager.UpdateAssociatedLicenseData($hostContainer.Uid, $licenseData) is taking only one argument. It throws errors with 2 arguments. Also, seems like UpdateAssociatedLicenseData updates the existing license data rather than adding/appending to it. I did not find any function which can Add rather than Update.

0 Kudos