YllowDnk
Enthusiast
Enthusiast

set root pw via powercli/esxcli, some passwords not working

Hello,

just got a script running to reset the root password for an esxi host (v7) as last step of automated rollout. (powercli v13.0.0.20829139)

$PWrootesxall = Read-Host -Prompt "please enter new root pw"

wanted to use esxcli for that:

$esxcli = Get-EsxCli -VMhost $esxi_02 -V2

when i try to change the root pw it works for some passwords, but not for all

$esxcli.system.account.set.Invoke(@{id= 'root'; password= "$PWrootesxall"; passwordconfirmation= "$PWrootesxall"})

f.e. the password K({a[Y2e}?}(Ius# is not working.

when i use the powercli command with the same $PWrootesxall array it works with this password:

Set-VMHostAccount -UserAccount root -Password "$PWrootesxall"

am i doing something wrong with the syntax when using the esxcli cmd ?

 

Regards

Manuel

 

 

 

 

 

Labels (2)
0 Kudos
0 Replies