VMware Cloud Community
mk112
Contributor
Contributor

PowerCli shows old license usage data

After removing an ESXi host from the vCenter inventory the license usage does still show old values over PowerCli:

$oServInst = Get-View ServiceInstance 
$oLicMgr = Get-View $oServInst.Content.licenseManager 
$oLicMgr.Licenses

Sometimes it takes hours until the "Used" property is up to date. I can´t find any way to trigger an update.

Any help would be appreciated.

0 Kudos
3 Replies
LucD
Leadership
Leadership

The license information is refreshed on a schedule.
Afaik there is no public API method to force such a refresh.


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

0 Kudos
mk112
Contributor
Contributor

Thank you for your answer. Do you know the time interval of the refresh?
0 Kudos
LucD
Leadership
Leadership

Not sure if this is documented somewhere, but when I look at the content of /var/log/vmware/cis-license/license.log, it seems to run on an hourly basis in my environment.
Open that file and search for QueryAssignedLicensesEx.


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

0 Kudos