vmware / PowerCLI-Example-Scripts

http://blogs.vmware.com/powercli
Other
754 stars 603 forks source link

Unable to assign user to machine in a Horizon pool configured for multiple dedicated assignments. #384

Open jdl242 opened 3 years ago

jdl242 commented 3 years ago

Hi. We are unable to assign user to machine in a Horizon pool configured for multiple dedicated assignments. We are on Horizon 7.12 and this is the command we are using to assign desktops:

Set-HVMachine -MachineName $machineName -User $userName

Here is the error that we get:

Exception calling "Machine_Update" with "3" argument(s): "ExceptionType : VMware.Hv.InvalidRequest ErrorMessage : User field cannot be updated for pools supporting multiple assignments" At C:\Program Files\WindowsPowerShell\Modules\VMware.Hv.Helper\VMware.HV.Helper.psm1:8959 char:8

rstolpe commented 3 years ago

I'm also interested that you fix this.

Same issue in horizon8.1

salcinad commented 2 years ago

Was there any solution for this use case? We do also have Pools with "multiple assignments" configured, and are unable to assign user to such machines.

Get-HVMachine -PoolName "pool_clients" -MachineName vdi001 | Set-HVMachine -User "domain\user"
Updating the Machine:  vdi001
MethodInvocationException: C:\Program Files\WindowsPowerShell\Modules\VMware.Hv.Helper\VMware.HV.Helper.psm1:9054:8
Line |
9054 |         $machine_helper.Machine_Update($services,$item,$updates)
     |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "Machine_Update" with "3" argument(s): "ExceptionType : VMware.Hv.InvalidRequest ErrorMessage : User field cannot be updated for pools
     | supporting multiple assignments"