admin user name cannot contain upper case character A-Z special characters or start with or - in Azure

0 votes

Hi Team,

I have configured Azure CLI in Windows. I am trying to create a VM from the command line. But it is showing me the below error.

$ az vm create -n MyVm -g MyResourceGroup --image UbuntuLTS
admin user name cannot contain upper case character A-Z, special characters \/"[]:|<>+=;,?*@#()! or start with $ or -
Nov 11, 2020 in Azure by akhtar
• 38,260 points
2,040 views

1 answer to this question.

0 votes

Hi@akhtar,

you can specify --admin-username to provide a username for the account to be created on the VM. Without that, the Azure CLI uses the username of your current shell login session. If the username you have logged into the Azure Cloud Shell or local PowerShell session contains those invalid characters, the VM create operation fails.

$ az vm create -n myvm -g MyResourceGroup --image UbuntuLTS --admin-username <user_name>


Hope it helps!

To know more, join our Azure Training in Sunderland today.

answered Nov 11, 2020 by MD
• 95,460 points

Related Questions In Azure

0 votes
1 answer

Want to upload a blob file with huge size to azure in as little time as possible.

Microsoft Azure Storage Explorer is one of the ...READ MORE

answered Mar 27, 2019 in Azure by Prerna
• 1,960 points
1,355 views
0 votes
1 answer
0 votes
1 answer

How to update a user account in Azure?

Hi@akhtar, You can update a Windows user account ...READ MORE

answered Nov 18, 2020 in Azure by MD
• 95,460 points

edited Jul 4, 2023 by Khan Sarfaraz 919 views
0 votes
1 answer

Is there a logical difference between WebApp and API app in Azure?

Basically there was only minute differences between ...READ MORE

answered Apr 27, 2018 in Azure by null_void
• 3,220 points
1,193 views
0 votes
1 answer

What is Azure Cloud Service?

Azure Cloud Services is an example of ...READ MORE

answered Jan 10, 2020 in Azure by Sirajul
• 59,230 points

edited Jun 21, 2023 by Khan Sarfaraz 1,097 views
0 votes
2 answers

Azure DevOps and its need?

Azure DevOps is a hosted service providing ...READ MORE

answered Aug 29, 2020 in Azure by nbavis
• 380 points
1,406 views
0 votes
1 answer

What is Azure stack?

Azure Stack is a hybrid cloud computing software solution ...READ MORE

answered Jan 10, 2020 in Azure by Sirajul
• 59,230 points
924 views
0 votes
1 answer

How is Azure Cosmos db different from an Azure SQL db?

Azure Cosmos DB is Microsoft’s globally distributed database ...READ MORE

answered Jan 10, 2020 in Azure by Sirajul
• 59,230 points
2,084 views
0 votes
1 answer

How to update a resource group lock with new notes and type in Azure?

Hi@akhtar, You can update the group lock with ...READ MORE

answered Nov 16, 2020 in Azure by MD
• 95,460 points
604 views
0 votes
1 answer

How to delete a user account in Azure?

Hi@akhtar, You can manage multiple users accounts for a ...READ MORE

answered Nov 18, 2020 in Azure by MD
• 95,460 points

edited Jun 21, 2023 by Khan Sarfaraz 1,769 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP