ometimes you may lose the administrator password or cannot log in to your Azure Virtual Machine. This can happen for many reasons, such as forgetting the password, malware infection, or corrupted configuration. Azure provides a simple way to reset the admin account password from the Azure portal.
Steps to Reset Admin Password
- Go to the Azure Portal and navigate to Virtual machines.
- Select your VM – for example,
hv4-VM1
. - In the left menu, scroll down to the Help section and click Reset password.
- In the Mode options, select Reset configuration only. This option will reset the Remote Desktop service configuration and allow you to log in again.
- Enter a new Username (or the same admin username) and set a new password.
- Confirm the password, then click Update.
Azure will process the change. After a few minutes, you should be able to log in to the VM using the new credentials.

Note:
- This method works for both Windows and Linux VMs (with some differences in options).
- For Windows VMs, it will reset RDP settings so you can connect again.
- Always change your password to something secure after regaining access.