Decniner2
Contributor
Contributor

How to get global entitlement group assigned to a specific pool?

I am trying to extract the global entitlement group assigned to a specific pool.  I have installed VMware.Hv.Helper module and I am using Get-HVPool.

$poolName = "test_pool_01"

$pool = Get-HVPool -PoolName $poolName

To get the pool global entitlement group assigned, I tried:

$pool.GlobalEntitlementData

I got:

GlobalEntitlement           

-----------------           

VMware.Hv.GlobalEntitlementId

Obviously this does not show the global entitlement group assigned to the pool.  Is it possible to get it based on the given pool name?

0 Kudos
1 Reply
KjellO
Enthusiast
Enthusiast

Hi,

You need to tweak the objects returned by the cmdlets from VMware so that you can compare the objects and get the correct information like for example this:

$GlobalEntitlement = Get-HVGlobalEntitlement | Select-Object -Property @{Name = 'Id'; Expression = {$_.Id.Id}}, @{Name = 'DisplayName'; Expression = {$_.Base.DisplayName}}

$DesktopPools = Get-HVPool

$Properties = @{

     Property = @{Name = 'ID'; Expression = {$_.Base.Name}},

                @{Name = 'Display Name'; Expression = {$_.Base.DisplayName}},

                @{Name = 'Global Entitlement'; Expression = {($GlobalEntitlement | Where-Object Id -eq $_.GlobalEntitlementData.GlobalEntitlement.Id).DisplayName}}

}

$DesktopPools | Select-Object -Property $Properties.Property

0 Kudos