Jump to content

Changing ESX root password


IrishTech
 Share

Recommended Posts

Greetings, 

 

I am tearing my hair out over this issue. I have copied the example of how this works, here.

 

image.thumb.png.c223455c7d5bb07dad0d1a8b1766dad7.png

 

The errant line is "Set-VMHostAccount -UserAccount $UserName -Password $NewPassword"

The error is that the UserAccount value cannot be found. 

 

The line works when run directly in PowerShell on the server. So at least it should work. 

It doesn't matter if the line is updated to have 'root' in place of the $UserName.

It doesn't matter if there are only 3 lines in the script (the connect, the error, the disconnect)

 

image.png.f2d439a7f605068e1319e48055d35127.png

 

Any pointers would be much appreciated. 

 

Irish

 

Link to comment
Share on other sites

Hello,

That example you've linked to is from another customer, and we have not tested it sorry - we believe your ESX environment needs PowerCLI installed for that script. Do you have that installed?

With our Linux Password Reset, this is what we currently have for resetting ESX accounts, although you need to enable SSH for that script to work. Is it possible to try that script instead?

Regards

Click Studios

Link to comment
Share on other sites

Greetings, 

 

PowerCLI is installed, the script works when manually running it. When running it through the PasswordState portal however, it fails with the above error. 

 

How does PasswordState run the scripts? Does it run under a service user? Does it alter anything about the script before it processes it? 

 

I could enable SSH before running the Linux reset, but would prefer to keep SSH disabled for safety. 

 

Irish

Link to comment
Share on other sites

Hi Irish,

 

Our powershell scripts are executed by the Passwordstate Windows Service on the web server, which by default runs under the identity of "Local System".  We don't modify the script in any way.

 

We aren't familiar with that module for ESX and have never tested it ourselves, we never got round to doing this or implementing it in our software.  If your Passwordstate Service is running under Local System, but you are still having issues, possibly you could PM Stefan from that other forum post in the hope he will be able to advise what he did to get it working in Passwordstate? 

 

I hope this helps a bit but sorry I couldn't give you much more information about this.

 

Regards,

Support

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...