Saturday, July 27, 2024

How to Reset Azure VM Password for Domain Controller

This blog explains how to reset the Azure domain controller VM's password when the local administrator password expires.

Pre-requites: Azure VM as a domain controller and expired local administrator password

Resetting the Azure VM password using the "Reset password" option under the Help in the Service menu will give the following error. "VMAccess Extension does not support Domain Controller." The solution is to use the Run Command to reset the local administrator password.

Navigate to the VM in the Azure portal and click on "Run Command" under the Operations section in the service menu.




Then select "EnableAdminAccount", which is marked with the number 2 in the above image and click on "Run".

Once the script finishes running, select "RunPowerShellScript" (which is indicated with the number 3) and run the following command to change the local administrator password. Use the RDP username with admin rights and any suitable value as a password.

net user [Username][password]


Once the above PowerShell script run is completed, you should be able to RDP to the server with the new password.


 


No comments:

Post a Comment