In the Azure Infrastructure Class at Interface Technical Training we spend time a lot of time working with virtual machines in the Azure Portal and also from the Command Line using PowerShell or Cross-Platform CLI. Something people run into time after time is they will launch a Windows Server but forget what the password was set to for their Administrator Account and now they are locked out of their system and can no longer login in or RDP in.
The Azure Platform makes it really easy to recover and reset Administrator passwords.
Here’s the Microsoft Azure Portal, this is the new Azure Portal and I’ve spun up a Virtual Machine. I have a Resource Group named “MyServers” and you’ll see that we have a Windows Server “WINSRV”. I’ll click on the Server and this will bring up another pane where we can see addition settings. Microsoft changes this panel from time-to-time so it may look different to you. Scrolling down in the middle column, you can see there’s an option for resetting password.
Currently the “Reset Password” option is in this location but I have seen it move around a bit so you may need to look for it in another location in the event that this option has moved. Previously, this was something that we needed to perform from the Command Line so it’s nice the Microsoft has surfaced this option in the Azure Portal.
I’ll clear out of the screen – this is easy to do; all you need to do it click the “Reset Password” option under Support and Troubleshooting. You can that there’s “Mode” for resetting the password that allows the options of Resting Password or you can Reset configuration only.
These two options refer to the Agent that will take care of this operation. This is the VM Access Agent in Azure. There are numerous Agents that control different elements in Azure such as Agents that run scripts on systems etc… This agent is to reset the password.
You can see that we have the User name and then two fields to put in a new password. The cool thing is that you can also create a new Administrator account. When I built this system in Azure, I used the name “sysadmin” as my local Administrator and set the password. Now if I forget the password, I can come into this screen and put in a new password that resets for this account or I could create an entirely new account from scratch. For example, if I didn’t want to reset this account’s password, I can create a new account “admin 2016” and now it appears to like this better and you just need to make sure that your passwords match.
Eventually, you will receive a bunch of green check marks that notify you that the information that you have inputted is correct and you can see here that I have a green check mark for the User Name, Password and Password Confirmation. Obviously, the password needs to be long and complex. If you’re trying to use a short password that is weak and doesn’t contain any special characters, Azure will notify you be indicating it in red.
At this point, we’re good to go so I will clear this out and all that is required to do is click on the Update button at the top of the screen. This will create my new user account names “admin2016” with the new passwords. Once it’s finished, I can RDP into the system with these new credentials.
So this is just one common problem that we run into when we’re working with virtual machines in the Azure Infrastructure class.
His instructor-led classed can be attend online with RemoteLive™.