Hello Everyone!
I'm trying to set all my vCenter's root VAMI passwords to the same password. I'm trying to figure out a way to do this via PowerCLI so I don't have to login to each VAMI. I'd like to be able to just run a script that would update all the passwords to all my vCenters all at the same time. I'm not finding much online. Could the vCenter REST APIs be used for this? I wasn't finding anything specific.
thanks!
sully7404
Yes, VAMI is part of the Appliance REST API available in vCenter Server. Take a look at https://developer.vmware.com/docs/vsphere-automation/latest/appliance/appliance/local_accounts/ which can be automated using PowerCLI and the Cis* cmdlets which maps to these and other REST APIs
Hi sully7404,
Did you already find a method to change te VAMI root password with PowerClI?
Unfortunately not. I ended up just logging into each. I played with some syntax but was never successful with it.
I didn’t have much luck but I’m sure it’s because I’m not doing something right. The syntax seemed to be outdated.
did you tried the function "update-vamiuser" in https://github.com/vmware/PowerCLI-Example-Scripts/blob/master/Modules/VAMI/VAMI.psm1 ?
Yes I've tried that one(https://github.com/vmware/PowerCLI-Example-Scripts/blob/master/Modules/VAMI/VAMI.psm1) and still working on that one too.
Also are looking at the REST api https://developer.vmware.com/apis/vsphere-automation/latest/appliance/appliance/local_accounts/ but cannot seem to get it to automatically recycle the VAMI root password.