VMware Cloud Community
ScottDriver42
Enthusiast
Enthusiast
Jump to solution

Problems with get-licensedatamanager

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:\>

Blog: https://virtualvt.wordpress.com/ | Twitter: VTsnowboarder42
Tags (1)
1 Solution

Accepted Solutions
kwhornlcs
Enthusiast
Enthusiast
Jump to solution

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

View solution in original post

3 Replies
kwhornlcs
Enthusiast
Enthusiast
Jump to solution

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

LucD
Leadership
Leadership
Jump to solution

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

ScottDriver42
Enthusiast
Enthusiast
Jump to solution

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

Blog: https://virtualvt.wordpress.com/ | Twitter: VTsnowboarder42
0 Kudos