PowerCLI

 View Only
  • 1.  add user to esxi host permission

    Posted Jan 20, 2023 07:34 PM

    HI.

    I have added user to an ESXi host using New-VMHostAccount -Id LJY -Password Password and give it read-only role using New-VIPermission -Entity (Get-Folder root) -Principal LJY -Role ReadOnly.

    But I dont see the resent user added to the permission on the host,with the ready-only role  now the user is create and found under security & users. I am getting this error while running new-vipermission :

    New-VIPermission : Cannot process argument transformation on parameter 'Entity'. This parameter no longer accepts an
    array

     

    any help , thanks



  • 2.  RE: add user to esxi host permission

    Posted Jan 20, 2023 07:44 PM

    Looks like you have more than 1 object in the value you pass on the Entity parameter.
    Can you check?
    Perhaps you have multiple vSphere server connections open and didn't use a Server parameter?

    Perhaps show us the code you are using, which makes it easier to help.