In order to change the root password of an ESXi Host using PowerCLI, firstly you will need to connect to the host in question as the root user:
Connect-VIServer esxi1.domain.local-User root-Password assdKIUU1235
Now by invoking the ‘Set-VMHostAccount’ cmdlet, we can change the root password as follows:
Set-VMHostAccount –UserAccount root –Password 123GHYJ!rys
One thought on “PowerCLI: Changing ESXi Host root password”