[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


How To: Change root user password in PowerCLI.

Published on
4,861 Points
1 Endorsement
Last Modified:
R@f@r P@NC3R
Never give up - The effort and daily dedication make a person a winner
The short tutorial provides step by step instructions on how to change the password of the Root user by using Vmware PowerCLI.

I hope you find it very useful.


First of all, let's define what is meant by the "Root" user in VMware.

The Root user is just the default user that is used when we start an installation of VMware ESXi on a physical server, to which we set a password to.

When a password change is required to the user referred as "Root", then the traditional way of achieving that task is by connecting directly to the ESXi, or via the VSphere client.

Imagine that you want to make the password change, as can be done by using either of the two methods mentioned above, but you may prefer to use a Command Line Interface to change the password instead. That can be done by using the VMware VSphere PowerCLI command line tool, which is very useful for this type of task and a whole lot more.

The article describes step by step instructions on how to change the password of the Root user, to another password that you, as an administrator may want to use, by using the arguably quicker PowerCLI method.

Changing the root user password using PowerCLI


Click on the VMware VSphere PowerCLI icon.


The VMware Vsphere PowerCLI black interface is displayed.


Enter Connect-VIServer and press Enter

Enter the name of the ESXi host - (esx-03a.corp.local) in the example below, and press Enter twice.


Enter the root user's credentials to authenticate to the ESXi Host.


Note the following display confirming the credentials entered were correct.


Enter the following command:

      Set-VMHostAccount -UserAccount root -Password (Enter your New password). Do not include parentheses ()


The resulting display shows that the password change was successfully completed.

Congratulations, the password has now been changed.

I hope you found this short tutorial useful and that you can apply it to your work activities in a virtual environment.


Featured Post

Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …
Teach the user how to use vSphere Update Manager to update the VMware Tools and virtual machine hardware version Open vSphere Client: Review manual processes for updating VMware Tools and virtual hardware versions: Create a new baseline group in vSp…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month