Remote Desktop Login
If you can't connect to a Windows virtual machine (VM), you can reset the local administrator password or reset the Remote Desktop service configuration. You can use either the Azure portal or the VM Access extension in Azure PowerShell to reset the password. If you are using PowerShell, make sure that you have the latest PowerShell module installed and configured and are signed in to your Azure subscription. You can also perform these steps for VMs created with the Classic deployment model.
Ways to reset configuration or credentials
You can reset Remote Desktop services and credentials in a few different ways, depending on your needs:
To expand the portal menu, click the three bars in the upper left corner and then click Virtual machines:
Reset the local administrator account password
Select your Windows virtual machine then click Support + Troubleshooting > Reset password. The password reset blade is displayed:
Enter the username and a new password, then click Update. Try connecting to your VM again.
Reset the Remote Desktop service configuration
Select your Windows virtual machine then click Support + Troubleshooting > Reset password. The password reset blade is displayed.
Select Reset configuration only from the drop-down menu, then click Update. Try connecting to your VM again.
VMAccess extension and PowerShell
Make sure that you have the latest PowerShell module installed and configured and are signed in to your Azure subscription with the Login-AzureRmAccount cmdlet.
If you type a different name than the current local administrator account on your VM, the VMAccess extension renames the local administrator account, assigns your specified password to that account, and issues a Remote Desktop logoff event. If the local administrator account on your VM is disabled, the VMAccess extension enables it.
The following example updates the VM named myVM in the resource group named myResourceGroup to the credentials specified.
Set-AzureRmVMAccessExtension -ResourceGroupName "myResourceGroup" -VMName "myVM" ` -Name "myVMAccess" -Location WestUS -UserName $cred.GetNetworkCredential.Username ` -Password $cred.GetNetworkCredential.Password -typeHandlerVersion "2.0"