Retrieves and decrypts the administrator password for the instances running Windows.
You must specify the key pair used to launch the instance.
![]() | Note |
|---|---|
The Windows password is only generated the first time an AMI is launched. It is not generated for rebundled AMIs or after the password is changed on an instance. The password is encrypted using the key pair that you provided. There is no SOAP or Query version of the |
ec2-get-password
instanceId -k
windows_keypair
| Name | Description | Required |
|---|---|---|
|
|
An instance ID returned from a previous call to Type: String Default: None Example: i-9b76d0f3 |
Yes |
|
|
The file that contains the private key used to launch the instance. Type: String Default: None Example: MyWindowsKeypair |
Yes |
The command returns a table that contains the following information:
The Windows administrator password
Amazon EC2 displays errors on stderr.
This example returns the administrator password for the i-2574e22a
instance.
PROMPT>ec2-get-password i-2574e22a -k windows-keypairq96A40B9w