VMware Cloud Community
fborges555
Enthusiast
Enthusiast

add user to esxi host permission

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

0 Kudos
1 Reply
LucD
Leadership
Leadership

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.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos