Menu
Amazon Elastic Compute Cloud
User Guide for Windows Instances

Setting Passwords for Windows Instances

When you connect to a Windows instance, you must specify a user account and password that has permission to access the instance. The first time that you connect to an instance, you are prompted to specify the Administrator account and the default password.

With AWS Windows AMIs for Windows Server 2012 R2 and earlier, the EC2Config service generates the default password. With AWS Windows AMIs for Windows Server 2016, EC2Launch generates the default password.

Note

With Windows Server 2016, Password never expires is disabled for the local administrator. With Windows Server 2012 R2 and earlier, Password never expires is enabled for the local administrator.

Changing the Administrator Password After Connecting

When you connect to an instance the first time, we recommend that you change the Administrator password from its default value. Use the following procedure to change the Administrator password for a Windows instance.

Important

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.

To change the local Administrator password

  1. Connect to the instance and open a command prompt.

  2. Run the following command. If your new password includes special characters, ensure that you enclose the password in double quotes:

    net user Administrator "new_password"
  3. Store the new password in a safe place.

Changing a Lost or Expired Password

If you lose your password or it expires, you can generate a new password. For password reset procedures, see Resetting a Lost or Expired Windows Administrator Password.