Azure VMs: Run Command

I am Happy and surprised to see , Microsoft commitments towards improvements of the services are quite amazing, I am using MS Azure services since when it is classic model (ASM) and it’s has very limited feature but when MS has started his “Resource Manager Journey”, It’s improving the lots of services and adding new feature day on day.

I am little bit surprise with this new Feature “Run Command” which is enable in Azure VMs Operations properties ,it’s will provide the “Powershell to execute the command, can enable the Administrator accounts and even more you can reset the password , set the remote ports” and many more which can’t be done through portal earlier.

Which will generally help to troubleshot the VMs related query.

Now you can easily get the IP configuration from the portal and enables lots of new below mention things. Below are list of the commands.

Name

Description

RunPowerShellScript

Executes a PowerShell script

EnableAdminAccount

Enable administrator account

EnableRemotePS

Enable remote PowerShell

IPConfig

List IP configuration

RDPSettings

Verify RDP Listener Settings

ResetAccountPassword

Reset built-in Administrator account password

ResetRDPCert

Restore RDP Authentication mode to defaults

SetRDPPort

Set Remote Desktop port

I am writing in my blogs how you can enable the those features.

Step:1 Run the Powershell script .

Click on the VMs which you want to enable the Run Commands.

Co to Operations and select the Run Command.

Select the PowerShell script to Run.

Select the PowerShell Script

Please Write or Past the PowerShell script .

Run the Powershell Commands for the same.

You will get an output in “Black” Screen.

Step:2 Enabling Admin Accounts .

If you missed or forget an user ID and password or required to enable the run command you can enable it from the portal.