Microsoft Secure Tech Accelerator
Apr 03 2024, 07:00 AM - 11:00 AM (PDT)
Microsoft Tech Community
Resetting the Local Admin Name and Password for Azure ARM Virtual Machines with PowerShell
Published Sep 20 2018 05:01 AM 1,090 Views
Microsoft

First published on TechNet on Feb 08, 2016

Hi there, this is JJ Streicher-Bremer, saying hello from Azureland.

 

When one creates a virtual machine in the Azure portal a username and password are required. This username and password are used by the Azure fabric to configure the local administrator account on that virtual machine.

 

I don’t know about you, but sometimes my memory fails me and I forget the username/password I set on my Azure virtual machines. If this is a “classic” virtual machine, the portal provides a nice UI that allows us to reset this username and password.

 

However for ARM (Azure Resource Manager) Virtual Machines we are presented with this screen:

 

What is even more frustrating is that the Azure documentation tells us how to reset the admin username and password for classic VMs, but not ARM (Azure Resource Manager) deployed VMs.

https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-reset-password/

 

The good news is that we _can_ reset the username and password of Azure VMs deployed in ARM with the set-azurermvmextension command. https://msdn.microsoft.com/en-us/library/mt619447.aspx

Unfortunately the MSDN document page doesn’t give an example, so I wanted to provide one here:

If successful you should see something like this:

Go ahead and log into your Azure ARM VM with the reset admin account and password you set.

 

Have fun and enjoy Azure!

 

JJ Streicher-Bremer

Version history
Last update:
‎Feb 20 2020 06:58 AM
Updated by: