VMware Cloud Community
virtualhobbit
Enthusiast
Enthusiast

Reset vCenter Server Appliance root password

Hi,

Is it possible to reset the vCenter Server Appliance root password using PowerCLI?

I thought this might work:

Set-VMHostAccount -UserAccount root -password "VMware1!"

But unfortunately it throws an error:

At least one element in the source array could not be cast down to the destination array type

Any ideas?

-Mark

Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership

Did, by any chance, the 90 days interval expire ?

If yes, I'm afraid you'll have to follow KB2069041, and, afaik, no PowerCLI solution available I'm afraid.


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

Reply
0 Kudos
npadmani
Virtuoso
Virtuoso

not too sure of cmdlet to do so

but  Set-VMHostAccount  is definitely not an option for that, this one is for ESXi hosts.

following KB gives you some ways to reset appliance password if it's been expired.

VMware KB: VMware vCenter Server Appliance 5.5 root account locked out after password expiration

Narendra Padmani VCIX6-DCV | VCIX7-CMA | VCI | TOGAF 9 Certified
Reply
0 Kudos
virtualhobbit
Enthusiast
Enthusiast

Hi,

Nope... this is a fresh build.

Changing the password via the CLI or admin page isn't an issue... I just wanted to know if it could be done using PowerCLI.

I'm building a script to configure a vCenter from the ground up.  This would be handy (if possible).

-Mark

Reply
0 Kudos
sarikrizvi
Enthusiast
Enthusiast

Issue:- Resetting Appliance (vCenter, vRA,etc.) password


Troubleshooting Steps #


1. Apply KB # 196 (VMware Knowledge Base) for Repeated characters when typing in remote console

2. Reboot appliance and Go to grub >>>Type e

3. Scroll to the second line displaying the kernel boot parameters >>>   Type e   >>>   Type init=/bin/bash  >>>   Enter   >>>    Type b

4. System boots to a shell    # >>>     Type passwd    >>>     change new password

5. Unlock root account  - pam_tally --user root --reset  or faillog -u root -r   >>>    Reboot .

Use above troubleshooting steps and issue will get resolve Smiley Happy

Regards,
SARIK (Infrastructure Architect)
vExpert 2018-2020 | vExpert - Pro | NSX | Security
vCAP-DCD 6.5 | vCP-DCV 5.0 | 5.5 | 6.0 | vCA-DCV 5 | vCA-Cloud 5 | RHCSA & RHCE 6 | A+ (HW & NW)
__________________
Please Mark "Helpful" or "Correct" if It'll help you
_____________________________________
@Follow:
Blog# https://vmwarevtech.com
vExpert# https://vexpert.vmware.com/directory/1997
Badge# https://www.youracclaim.com/users/sarik
Reply
0 Kudos