Configuring a Windows Instance Using EC2Launch to reset password for a new AMI on EC2

Hits: 4077

I launched a new Windows Server 2016 on AWS.

When packaging up an EC2 to pass on to clients or to the AWS Marketplace

I am not sure what the issues were. I have switched back and forth to between SVR 2012 and 2016. I don’t do fancy stuff, just resetting the password

I copied this for a script, but did it manually in powershell,

“type”: “powershell”,
“inline”: [
“C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\InitializeInstance.ps1 -Schedule”,
“C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SysprepInstance.ps1 -NoShutdown”


C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeInstance.ps1 -Schedule

C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\SysprepInstance.ps1 -NoShutdown

After this you can create the image which will have a new password.

You need to restart your original instance in order for it to assign a new password.

Follow instructions at the link below if you if you want to change stuff like wallpaper, drive mappings or set a specific password.


Source: Configuring a Windows Instance Using EC2Launch – Amazon Elastic Compute Cloud

%d bloggers like this: