I've scripted my pool creation however I'm trying to add the entitlements and I can only get New-HVEntitlement to add users, not groups. If I run
PS> New-HVEntitlement -User "user@domain.internal" -ResourceName "Staging"
1 resource(s) will be entitled with UserOrGroup: user@domain.internal
But when I try adding an AD group I get
PS > New-HVEntitlement -User "horizon-administrators@domain.internal" -ResourceName "Staging"
Unable to find specific user or group with given search parameters
or
PS > New-HVEntitlement -User "domain.internal\\horizon-administrators" -ResourceName "Staging"
Unable to find specific user or group with given search parameters
I've tried all combinations of the domain name, slashes, @'s and always get the same error. However from the GUI I can clearly add this group and it works. I've even tried using the same syntax (what is listed above with the slashes) that the GUI shows when I add it. I'm at a loss of if this is a bug or if I'm simply not using the correct syntax for the command. I'm running Horizon 7.9 (I updated from 7.8 to see if that made a difference) and PowerCLI Version
----------------
VMware PowerCLI 10.1.0 build 8346946
---------------
Component Versions
---------------
VMware HorizonView PowerCLI Component 7.1.0 build 8827468
VMware Cis Core PowerCLI Component PowerCLI Component 10.1 build 8377811
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 10.1 build 8344055
You have to use the Type parameter.
The default value for Type is 'User', hence the "Unable to find ..." message
New-HVEntitlement -ResourceName MyPool -Type Group -User domain\group
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You have to use the Type parameter.
The default value for Type is 'User', hence the "Unable to find ..." message
New-HVEntitlement -ResourceName MyPool -Type Group -User domain\group
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference