0
votes

We're using an azure vm as a domain controller and for some reason the local administrator's pw has expired. When trying to reset the pw I get the following error message: "VMAccess Extension does not support Domain Controller."

I have tried unsuccessfully running the suggested script from here.

Any ideas how to solve this?

3
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 (not supported on Windows Domain Controllers). Reference: docs.microsoft.com/en-us/azure/virtual-machines/windows/…Vikranth S
Thanks, but as stated in my question I get an error when trying to reset the pw.Benji Kok

3 Answers

0
votes

MSFT Support let me know that it's not possible to log into an Azure VM that is a domain controller VM with the user that is created in the Azure portal when configuring the VM. You can only log in using one of the domain users.

0
votes

For a DC, the reset is not supported using the normal VM Reset Password option. Instead, use a custom script:

  1. Open a new notepad window.

  2. Write: net user [Username] [Password]

Without the brackets and replacing the default values with your own.

  1. Save it as script.ps1

  2. Navigate to the VM in the Azure Portal

  3. On the left menu under Settings > select Extensions > select Add+

  4. Select Custom Script Extension option from the list

  5. Select Create

  6. Upload the script.ps1 file

  7. Select Ok

0
votes

MS now have this covered with PowerShell access for owners/admin.

  1. Navigate to the VM in the Azure Portal.

  2. On the left menu:

    2a. enter "run" into the search textbox and press enter, then click on 'Run Command'

    OR

    2b. navigate to Operations > Run command

  3. Click on EnableAdminAccount then click Run. Use the X in the top right to close the window, and wait for the notification when the script finishes. Select EnableAdminAccount again to see progress if necessary.

  4. If step 3 succeeds, cick on "RunPowerShellScript".

  5. In line numbered 1 enter "net user [Username] [Password]", then click Run. The [username] here is the RDP user to login with local owner/admin rights.

  6. Job done. You should now be able to RDC to your server using the local admin [username] as the login name (ie. \username).