Friday, September 30, 2016

Creating a local Esxi user/role using PowerCLI

Steps Involved:

1. Connect to the Esxi Host:

Connect-VIServer -Protocol https -Server FQDN_or_IP_of_VMhost -User root -Password  your_password

2. Add a local user with the New-VMHostAccount command:

New-VMHostAccount -Id account_name -Password your_new_password -Description description_of_the_user

3. Add a new role and specify the privileges involved:

New-VIRole -Name your_role_name -Privilege “eg: Settings”

4. Bind the new role to the new user:

New-VIPermission -Entity FQDN_or_IP_of_VMhost -Principal account_name-Role your_role_name -Propagate:$true

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.