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

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

Comments (3)
  1. Chris.D says:

    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?

  2. john c says:

    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?

  3. DeChrist says:

    The Portal UI “Reset Password” feature is now live for RM based VM’s.
    Also, the documentation has been updated substantially:

Comments are closed.

Skip to main content