For system, network and cloud administrators

How to retrieve the admin username of your Azure virtual machine using Azure CLI

If you need to know what’s the admin username of a particular Azure virtual machine, use:

az vm show --resource-group YourResourceGroup --name YourVMName --query "osProfile.adminUsername"

Leave a Reply

Your email address will not be published. Required fields are marked *