Problem solve Get help with specific problems with your technologies, process and projects.

PowerShell – Add Licenses to vCenter

PowerShell – Add Licenses to vCenter

Well, I have been working on how to do this for a couple of days (believe it or not). I find navigating the VI...

API/SDK a bit a struggle. In the end I google-wacked an obscure part of my powershell that was giving me troubles, and found this community thread:

$si = Get-View ServiceInstance

$LicManView=Get-View $LicManRef

$license = New-Object VMware.Vim.LicenseManagerLicenseInfo
$license.LicenseKey = “YOUR LICENSE STRING HERE”

I found out the editionkey value by using the QueryAssignedLicenses method which is part of LicenseManager. Anyway, I kinda got sidetracked by this – because what I really want to do is license an ESX host after its been added to the vCenter with the add-vmhost cmdlet. This should be a good start to working it out.

Dig Deeper on VMware Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.