There is an easier way to do this if you have the license to use host profiles. I believe it requires the enterprise license,
https://kb.vmware.com/s/article/68079
1. Login to the vCenter WebClient
2. Go to Home and then choose Host Profiles from Operations and Policies Section.
3. Choose > Extract profile from a host.
4. In the Extract Host Profile menu wizard > Select the host you want to update the password for.
5. Name the Host Profile and click Next and then Finish to complete the capture of the host profile template.
- The new host profile should appear on the Host Profile Objects Field.
6. Right Click the new Host Profile or using the Actions menu choose > Edit Settings
7. In the 'Edit Host Profile' Wizard. Uncheck all boxes.
8. Then using the search filter search for > root
9. Highlight and then select the check box for > root
10. A configurable window will display the root User configuration.
11. At the Password subsection, choose > Fixed password configuration
12. Here you will fill in the new password and confirm it before proceeding.
13. Double check that all other non applicable boxes have no check marks and proceed to Finish .
14. Once the Task Completes highlight the new host profile and from the 'Actions' drop down menu choose > Attach Detach Hosts and Clusters > then Select the host in the wizard.
15. From the Action Menu select Check Host Compliance.
16. From the Action Menu select Remediate
17. Then Check Host Compliance.
18. Remove the Host Profile from the Host.
- At this time the host password should be successfully upgraded.