Condividi tramite


How to reset the password in Windows on Azure ARM based VM?

Azure has two different deployment models for creating and working with resources: Resource Manager and classic.

 

For classic machines you can easily reset the password using the portal or PowerShell, however these options are not available yet for virtual machines created by Resource Manager:

 

 

You can still reset the password by using the Azure command line tool (Azure CLI).

 

1. Download and install Azure CLI https://azure.microsoft.com/en-us/documentation/articles/xplat-cli-install/

2. Open command line and enter the following command:

C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin>azure login

Azure CLI will display the URL to the user so that they may use a web browser to access the portal and authenticate, and then you will need to enter the PIN code

3. Change the configuration mode to Resource Manager by entering the following command:

C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin>azure config mode arm

4. Finally, you can reset the password by using this command:

C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin>azure vm reset-access -g RESORCE_GROUP_NAME -n VM_NAME -u USER -p PASSWORD

Remember to change RESORCE_GROUP_NAME, VM_NAME, USER and PASSWORD

Comments

  • Anonymous
    March 21, 2016
    I get the following error message when following the steps:

    "Multiple VMExtensions per handler not supported for OS type 'Windows'. VMExtension 'VMAccessAgent' with handler 'Microsoft.Compute.VMAccessAgent' already added or specified in input."

    Any idea what might be wrong?
  • Anonymous
    April 02, 2016
    On Linux I get this error:

    error: Long running operation failed with error: 'Multiple VM extensions failed to be provisioned on the VM. Please see the VM extension instance view for details.'.

    And the VM extension listing in the portal shows "unavailable".

    Any suggestions?
  • Anonymous
    May 17, 2016
    The Portal UI "Reset Password" feature is now live for RM based VM's.Also, the documentation has been updated substantially: https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-reset-rdp/