Lost/forgotten password for "root" account on ESXi Server can be reset using Host Profile based approach as outlined in Reset ESXi Root Password with Host Profile.
If the vCenter Server license doesn't allow the use the Host Profiles, password reset for ESXi Server managed by vCenter Server can be performed using PowerCLI
If PowerCLI is not already installed in the environment follow the Installation Guide to install it.
Reset the password for "root" user following steps as outlined below
$creds = Get-Credential -UserName "root" -Message "Enter root as username and new password"
$esxiserver = Get-VMHost -Name ESXI_NAME_FROM_VC_INVENTORY
$esxcli = Get-EsxCli -VMHost $esxiserver -V2
$userarg=$esxcli.system.account.set.CreateArgs()
$userarg.id=$creds.UserName
$userarg.password=$creds.GetNetworkCredential().Password
$userarg.passwordconfirmation=$creds.GetNetworkCredential().Password
$esxcli.system.account.set.invoke($userarg)
Please note that this method doesn't validate the quality of the password used during the execution. Any such validation will happen at the ESXi Server when the command to reset it sent via ESXCli.
This method works only for ESXi Server that are managed by vCenter Server and NOT in "Disconnected" or 'Not Responding" State.