VMware Cloud Community
MattTaylor
Contributor
Contributor
Jump to solution

Add/update a license key with powercli script - standalone host

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.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

0 Kudos
3 Replies
maishsk
Expert
Expert
Jump to solution

Welcome to the forums.


I have moved the thread moved to the appropriate VMware vSphere™ PowerCLI forum

Maish Saidel-Keesing • @maishsk • http://technodrone.blogspot.com • VMTN Moderator • vExpert • Co-author of VMware vSphere Design
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
MattTaylor
Contributor
Contributor
Jump to solution

Thanks, that works great.

0 Kudos