Step-By-Step: Recovering a Lost Azure VM Admin Password

Last week Microsoft Canada, with help from Pierre Roman and the team at CANITPRO.NET, delivered Canada's first Azure camp attended by 120+ Toronto based IT professionals. The event was warmly received and is currently being packaged to be delivered at a Canadian city near you. Attendees at the event were instructed to bring their own laptops and setup their own Azure trials at the camp to partake in the many labs made available through the camp. We were delighted to see that many attendees had already started testing Microsoft Azure and had existing VMs already reporting as available amidst their portal. The challenged they faced however, is that most had forgotten their admin passwords and were unable to access said Azure VM. This Step-By-Step post will address this issue and will enable those locked out to access their VMs once again.

Note: You can enter your existing username in this scenario. The next step will replace the passcode for an existing username or replace both the username and password attached to the existing local Admin account.Note: The password provided must meet password complexity requirements and so must include 1 lower case letter, 1 UPPER case letter, and 1 number and/or 1 symbol. The step below will still achieve success however once the VM restarts your will be prompted for a compliant password.

Enter and run the following cmdlet to reset the built-in local Admin credentials with the ones provided in the previous step:

Login into your Azure VM using your newly set local admin username and password.

As you can see, PowerShell can be a powerful tool in the management of your infrastructure. Be sure to take advantage of Microsoft Virtual Academy's Getting Started with PowerShell 3.0 Jump Start to further your learning as to how PowerShell can further enable your career.