Dev With Nerds


How to access an Azure VM when credentials are unknown

1. This is the VM that we lost access to due to credential misplace. In order to reset the password, we should know the username, but in this case, we don’t know that either.

2. This is a Windows Server VM. You can see that we cannot gain access to it using RDP due to incorrect credentials

3. To reset the password, we need to find username, this username shouldn’t be the Local Administrator Account, because when creating Azure VM, you can’t provide Administrator as username and it has to something else. If you navigate to “Export Template” Under “Automation” you can find the deployment template that used to create this VM. Then we have to find the adminUsername to find the Username. In this example its “sysadmin”.

4. Once you find the “adminUsername” now you can proceed to reset the password in the “Rest password” under Help. Here you have to provide the Username that you found in the deployment template, here its “sysadmin” and the new password then Click Update. This Process will rest the password with the new password that you set here.

5. Once you reset the password successfully you can try login to the RDP using the new credentials. You can see that I was able to gain access to the Server.