Hi all,
I want to add an AD user to an ESXi host using powerCLI. The process works fine through ESXI's HTML UI, but I need a PowerCLI command.
So if I go to the Actions->Permissions tab on the ESXi UI, I can see both local and added AD users.
However, through PowerCLI, you only see local users even during the query:
PS C:\Windows\system32> Get-VMHostAccount
We have already found how to add a local user and it's works:
PS C:\Windows\system32> New-VMHostAccount -Id test1 -Password XXX
PS C:\Windows\system32> New-VIPermission -Entity (Get-Folder root) -Principal test1 -Role Admin
But when we want to add AD user, it just doesn't work with any command. Does anyone have a command to add an AD user?
Additional informations:
- ESXi 8.0U1
- The ESXi host is managed by a vCenter Server.
- The ESXi host is joined to the domain where from we would like to assign users for the host.
Thank you for your help!
Mark