VMware Cloud Community
arifdipu1
Contributor
Contributor

How to reset root password ESXi version 7

How to reset root password ESXi version 7? If anyone know how only the way. Please share

Reply
0 Kudos
6 Replies
nachogonzalez
Commander
Commander

Hello, officially is you lost the root password you have to reinstall.
Unofficially you can try this:
https://www.vmwareblog.org/forgot-esxi-root-password-no-problems-4-ways-reset/


8islas
Enthusiast
Enthusiast

If you have vCenter and the correct license you can use Host Profiles to reset the root password.

Reset ESXi Root Password with Host Profile (68079) (vmware.com)

 

s_wieland
Enthusiast
Enthusiast

I think, there is a much easier way, that isn't linked yet.

If the ESXi is registered to vCenter, you can use PowerCLI together with esxcli to reset the password.

You can also use this script to change the root password periodically

 

#Connect to vCenter
Connect-VIServer <vcenter-name>

#Connect to esxcli
$esxcli = Get-EsxCli -VMhost <esxi-host-name> -V2


#Define new password for root
$arg = $esxcli.system.account.set.CreateArgs()
$arg.id = ‘root’
$arg.password = ‘NewPassword’
$arg.passwordconfirmation = $arg.password

#Set new password
$esxcli.system.account.set.Invoke($arg)

 

anilspp
Enthusiast
Enthusiast

Great info.

Reply
0 Kudos
Wishy1
Contributor
Contributor

Excellent, that technique is great.  Thank you.

Reply
0 Kudos
borg111271
Contributor
Contributor

Can you send me a How-to-Do for your script. I don't work so often with the PowerCli.

Thanks Manuel

Reply
0 Kudos