The Wayback Machine - https://web.archive.org/web/20240120024544/https://www.geeksforgeeks.org/microsoft-azure-retrieve-azure-virtual-machine-admin-user-name/
Open In App
Related Articles

Microsoft Azure – Retrieve Azure Virtual Machine Admin User Name

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

In this article, you will get to know, how you can find an azure Virtual machine admin user name in crucial situations to recover an azure VM Username. Purpose – this username will help you to reset an azure VM password in the absence of Admin or else if some forget or In case of verifying the username.

Implementation:

Follow the below steps to find Azure VM Admin user name:

Step 1: Log in to Azure Portal. 

Step 2: Open Cloud Shell >> select PowerShell.

Image

Step 3: Copy the below Azure PowerShell Command and Paste the command in the cloud shell console.

Get-AZVM -Name "Provide_the_Azure_VM_Name_Here" | Select-Object -ExpandProperty OSProfile

For Example: 

Get-AZVM -Name "CloudOps-VM1" | Select-Object -ExpandProperty OSProfile

Image

If you want to filter from a specific Resource Group then use the below command

Get-AZVM `
-Name "Provide_the_Azure_VM_Name_Here" `
-ResourceGroup "Provide_Resource_Group_Name_Here" `
| Select-Object -ExpandProperty OSProfile

Output:

Image

That’s it, you are done. This way we can retrieve the user name of an Azure VM administrator.

Lost in the complex landscape of DevOps? It's time to find your way! Enroll in our DevOps Engineering Planning to Production Live Course and set out on an exhilarating expedition to conquer DevOps methodologies with precision and timeliness.
What We Offer:
  • Comprehensive DevOps Curriculum
  • Expert Guidance for Streamlined Learning
  • Hands-on Experience with Real-world Scenarios
  • Proven Track Record with 100,000+ Successful DevOps Enthusiasts

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 11 Apr, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials