问题
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?
回答1:
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.
回答2:
For a DC, the reset is not supported using the normal VM Reset Password option. Instead, use a custom script:
Open a new notepad window.
Write: net user [Username] [Password]
Without the brackets and replacing the default values with your own.
Save it as script.ps1
Navigate to the VM in the Azure Portal
On the left menu under Settings > select Extensions > select Add+
Select Custom Script Extension option from the list
Select Create
Upload the script.ps1 file
Select Ok
来源:https://stackoverflow.com/questions/48149387/reset-azure-vm-pw-for-domain-controller