password reset for vm

Wayne Walls 40 Reputation points
2024-04-28T13:25:09.1866667+00:00

I have forgotten my password for the vm i created recently. i watched a video on how to change it but found that i do not have access to the section for resettting passwords Screenshot 2024-04-28 140954

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

Accepted answer
  1. Nehruji R 2,126 Reputation points Microsoft Vendor
    2024-04-29T06:18:30.93+00:00

    Hello Wayne Walls,

    Greetings! Welcome to Microsoft Q&A Platform.

    To change the password for an Azure VM, you would typically need to have Contributor or Owner level access to the Azure subscription or the specific VM resource. This level of access allows you to perform actions like resetting passwords using Azure’s built-in functionality.

    If you’re a User Access Administrator, you can also manage access rights for others, which could indirectly allow you to reset passwords if you grant the necessary permissions to yourself or another account.

    There are some following ways that you can reset the Password,

    1.Resetting Password for Windows VM using Azure CLI:

    • Open Azure Cloud Shell.
    • Use the following command to reset the password:

    az vm reset-access --name your_vm_name --resource-group your_resource_group --admin-password new_password

    Replace your_vm_name with the name of your VM and your_resource_group with the name of your resource group. Also, replace new_password with the new password you want to set.

    Thats it you will be able to login with the new credentials now.

    or

    2.you can follow the steps mentioned in the below link to reset password of an Azure VM using Azure Portal->VM blade Reference: reset-rdp reset-password-of-an-azure-virtual-machine-vm

    160190-image.png

    160323-image.png

    You could refer to the following non Microsoft link for more detailed steps, how-to-reset-password-in-azure-virtual-machine

    There is an offline method to reset the password however it is a bit complex. You could take a look at that from the following reset-local-password-without-agent, https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/reset-password.

    Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.


    Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Marcin Policht 12,320 Reputation points MVP
    2024-04-28T13:58:34.82+00:00

    Try https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/reset-local-password-without-agent


    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. Dillon Silzer 54,731 Reputation points
    2024-04-28T16:19:11.84+00:00

    Hi Wayne,

    #1 It is possible that you have multiple accounts (one an Admin, one a user). Ensure you are logged into Azure with your Admin account.

    #2 If you are a Global Administrator in your tenant, you can elevate yourself to become an Admin in all of your Azure subscriptions:

    Elevate access to manage all Azure subscriptions and management groups

    https://learn.microsoft.com/en-us/azure/role-based-access-control/elevate-access-global-admin?tabs=azure-portal

    Try out the above solutions if you are having issues resetting the password (restricted from the Reset Password blade).

    If this is helpful please accept answer.

    0 comments No comments