Today I got
an interesting question from one of my friend “How can we change the Password
of the vSphere.local domain users in VRA created while creating a new tenant?”
After a
lot of search from VMware community i find a link, which give me some tips to solve
the same.
So What do
I need?
First I
updated my PowerShell to version 5 alteast. (System will be restart)
Second I
downloaded PowerCLI 6 (may not be required)
Launch Powershell
Run the
following cmdlet: Save-Module PowerVRA –Path c:\
Install-Module
–Name PowerVRA
Once the
Module is installed we are ready to run VRA commands, so first we need to initialized
the connection to vra tenant where the user is defined
For example:
connect-vraserver –Server sa-vra-01.vclass.local -Tenant Eng -UserName vraadmin@vsphere.local
It will
prompt to type the password of the user.
Once the
connection is initialized use the following command to list all users in
Tenant.
Get-VRAUserPrincipal
So identify
the user (ID of the user) whose password you want to modify and run the
following command.
First we
declare a variable to store the secure string (Password you want to set for the
user)
Then run
the following command to change the password ($var1)
$var1 =
ConvertTo-SecureString “Pa$$w0rd” -AsplainText -Force
Set-vRAUserPrincipal
-Id vraadmin@vclass.local -Password $var1
The password
will change. :)
No comments:
Post a Comment