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?

1 Antwort
0
Akzeptierte Antwort

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
EXPERTE
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen