If you work in company with strict password compliance rules, for example under SOX, you might well have to change administrator passwords every month. Doing this on any more than a few hosts is tedious work – even on two hosts it seems like a waste of time logging on the host via SSH (or even enabling it first) before changing the password. Then we also need to audit the change, there’s no point making it for compliance reasons if we can’t then prove we did it!
Steps taken from VM KB 1004659
Rinse and repeat
The script is fairly heavily commented, usage is as follows:
.\Change-HostPasswords.ps1 -vCenter VC-01.definit.local -Location “DefinIT Lab”
Source code for this has moved to GitHub to allow a bit more structured collaboration: