Does anyone know how to add/update a license key with powercli script.
I can do it OK with LicenseAssignmentManager when connected to vcenter server, but i can't do it when assigning a free license key to a standalone host as the ServiceInstance.Content.LicenseManager.LicenseAssignmentManager is $null. (esx5-623860)
Cheers,
Matt.
Try something like this
$licMgr = Get-View -Id 'LicenseManager-ha-license-manager'
$licMgr.UpdateLicense("00000-00000-00000-00000-00000", $null)
This will assign an evaluation license.
If you have a valid license key, replace the "00000-00000-00000-00000-00000" with your key.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Welcome to the forums.
I have moved the thread moved to the appropriate VMware vSphere™ PowerCLI forum
Try something like this
$licMgr = Get-View -Id 'LicenseManager-ha-license-manager'
$licMgr.UpdateLicense("00000-00000-00000-00000-00000", $null)
This will assign an evaluation license.
If you have a valid license key, replace the "00000-00000-00000-00000-00000" with your key.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks, that works great.