Reset Administrator Password on Azure VM that is a domain controller

Systems Administrator 20 Reputation points
2025-02-23T13:15:52.42+00:00

Azure VM is a Domain Controller

Administrator password is lost. We have the username.

We probably have the correct DSRM password

It appears Azure password reset for a VM local account is not supported on a Domain Controller

What are our next steps to reset DC Administrator account password?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,041 questions
0 comments No comments
{count} votes

Accepted answer
  1. Marcin Policht 50,735 Reputation points MVP Volunteer Moderator
    2025-02-23T14:37:12.46+00:00

    Try the following

    https://www.cswrld.com/2023/12/how-to-reset-domain-admin-password-on-an-azure-vm/

    https://www.chrisjohnson.io/2018/02/15/domain-controller-in-azure-vm-with-expired-password/


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Leandro Ezequiel Molinari 251 Reputation points
    2025-02-23T14:38:51.3833333+00:00

    Hi, good day.
    In this case and considering that this is a Azure VM, I think that the best approach to get a solution about this question, is rise a support request in Azure Portal directly.
    I hope this is helpful.

    0 comments No comments

  2. Systems Administrator 20 Reputation points
    2025-02-24T15:06:00.6333333+00:00

    Issue resolved. Both links provide the same solution to run net user in a Powershell script using the Run Command feature. Posting here the longhand version, for the record, from https://www.chrisjohnson.io/2018/02/15/domain-controller-in-azure-vm-with-expired-password/:

    Solution:

    Before you go and delete the VM and build up a new one I found an interesting way to fix this.

    Updated 5/20/2021:  The new way to run PowerShell via the admin portal makes things really simple. 

    • Go to the VM in the azure portal
    • Click Run Command in the left hand navigation
    • Choose “RunPowerShellScript” from the options
    • Paste in the following PowerShell (obviously replace the username and password you want to set)

    net user <YouAdminUserName> <YourNewPassword>

    Then click Run and let the script run for a while and when it is complete your password will be reset correctly.

    Can confirm this worked as intended to reset the Domain Admin password on an Azure VM Domain Controller with a lost Administrator password!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.