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.
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
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