-
-
Save ddmunhoz/7c38e69872819c767182acdb0eda4bee to your computer and use it in GitHub Desktop.
Change ESXI host root account password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create a Host List | |
$vmhosts = Get-VMhost | |
$Get credential required to log in as root on the ESXI Hosts | |
$oldCredential = Get-Credential | |
$vmhosts | foreach {Connect-Viserver $_.Name -credential $oldCredential -warningaction silentlycontinue ; Set-VMHostAccount -UserAccount root -password "TYPE_YOUR_PASSWORD_HERE" ; Disconnect-viserver -server $_.Name -Confirm:$false} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment