I'm not sure if it's the command or me, but I cannot query existing licenses. I get an object returned as you can see below, but no matter what I try I can't get any data to return. According to help, the below should return all of my licenses, but I'm getting nothing back.
What am I missing? This one should be simple.
PowerCLI 6.5, vCenter 6.0.0 3634793, with external PSC's.
H:\> $ldm=Get-LicenseDataManager
H:\> $ldm
Uid
---
/VIServer=ME@VC:443/LicenseDataManager=LicenseDataManager/
H:\> $ldm.QueryEntityLicenseData()
H:\>
Might be the cmdlet. You could try this - it worked for my environment (6.0 with ext psc) at least for what I gather you're looking for:
$serviceInstance = Get-View ServiceInstance
$licenseman = Get-View ($ServiceInstance | Select -First 1).Content.LicenseManager
$licenseman | Select -ExpandProperty Licenses
Note: Can't take credit for this, pulled necessary bits and pieces, and you may get more out of, this blog:
Retrieving License keys from Multiple vCenters - VMware PowerCLI Blog - VMware Blogs
Might be the cmdlet. You could try this - it worked for my environment (6.0 with ext psc) at least for what I gather you're looking for:
$serviceInstance = Get-View ServiceInstance
$licenseman = Get-View ($ServiceInstance | Select -First 1).Content.LicenseManager
$licenseman | Select -ExpandProperty Licenses
Note: Can't take credit for this, pulled necessary bits and pieces, and you may get more out of, this blog:
Retrieving License keys from Multiple vCenters - VMware PowerCLI Blog - VMware Blogs
It's not you afaik, I have the same problem with Get-LicenseDatamanger (vCenter 6.5)
Update: the previous solution also works in vSphere 6.5
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Gents. I'd found my way to that article as well, but was trying to make the module work. Glad to know it's not just me.
Cheers