Is it possible to set Windows Administrator password via User Data Script?

0

I am trying to launch a new EC2 windows instance from a Windows AMI. Since this AMI is not syspreped, this new instance in not joining the AD once it comes up. Is it possible to setup a local user credentials with powershell user data script for this new windows EC2 instance?

asked 5 months ago556 views
1 Answer
0
Accepted Answer

Hello.

You can change your password using your user data as described below.
However, you will no longer be able to obtain a new password using the Amazon EC2 console as described in the following documentation.
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-passwords.html

Store the new password in a safe place. You won't be able to retrieve the new password using the Amazon EC2 console. The console can only retrieve the default password. If you attempt to connect to the instance using the default password after changing it, you'll get a "Your credentials did not work" error.

<powershell>

net user Administrator "New Password"

</powershell>
profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions