VMware Cloud Community
sully7404
Contributor
Contributor

vCenter Appliance VAMI root password change via PowerCLI

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

Reply
0 Kudos
6 Replies
lamw
Community Manager
Community Manager

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

RonaldMartens
Contributor
Contributor

Hi sully7404,

Did you already find a method to change te VAMI root password with PowerClI?

Reply
0 Kudos
sully7404
Contributor
Contributor

Unfortunately not. I ended up just logging into each. I played with some syntax but was never successful with it. 

sully7404
Contributor
Contributor

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.

berndweyand
Expert
Expert

RonaldMartens
Contributor
Contributor

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.

Reply
0 Kudos