New Question
0

Setting up password using customization script OpenStack for Windows instance

asked 2021-08-15 11:37:56 +0200

kamalsulaiman97 gravatar image

updated 2021-08-16 11:28:04 +0200

Hi everyone,

I recently trying out to run customization script feature on OpenStack to change adminstrator password for Windows instance. However, the script doesn't work. I have also tried out script to create and change computer name and it worked. Below are the example that I have followed:

The failed command is as below:

#ps1
net user administrator P@ssw0rd

I have also added the inject password option:

inject_user_password = true

Anyone can suggest or helps? Your guides and views are highly appreciated.

Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2021-12-11 17:39:22 +0200

Tandj5 gravatar image

I assume you are trying to stick with powershell for your commands so:

ps1

$NewPassword = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force Set-LocalUser -Name administrator -Password $NewPassword

If you were trying to do it with cmd line then: runcmd: - net user administrator P@ssw0rd

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2021-08-15 11:37:56 +0200

Seen: 781 times

Last updated: Dec 11 '21