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?

demandé il y a 5 mois584 vues
1 réponse
0
Réponse acceptée

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
répondu il y a 5 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions