Our website use cookies to improve and personalise your experience and to display advertisements (if any). Our website may also include cookies from third parties like Google Adsense, Google Analytics, Youtube. By using the website, you consent to the use of cookies.

Blog Post

Change root password on all (or some) vSphere hosts

As part of a security audit I needed a quick way to change the ESXi root passwords without having to go on to each server. I was looking for a script that would automate at least some of the work for me and I came across a script called Change-ESXiPassword.ps1 that was created by Jesse Gardner which I thought I would give a try.

After running the script and knowing it works fine I will be personally be running this every quarter.

This script:

  • prompts you for the old password
  • prompts you for the new password
  • prompts you for the vCenter server name
  • prompts you for vCenter credentials
  • Queries vCenter for all hosts that you wish. See “Host selection section” in the middle of the script to tweak what hosts it may find
  • Disconnects from vCenter
  • Connects to each host individually and changes the root password

Download the script HERE and give it a try.

One Comment

  • Amar

    Hello There,
    i am trying to use the esxi host password change script, None of the host selection option is returning anything back. I am running vcenter 5.5 and esxi 5.0. would like to run the script on one cluster at a time. Any help would be appreciated. thanks

Comments are closed.

Related Posts