![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to retrieve Azure VMs using PowerShell?
To retrieve the azure VMs using PowerShell, we can use Get-AzVM commands but before that make sure you logged in using Azure Credentials in the console. When you type this command, you will get the list of all VMs in the specified subscription.
To check which all properties are supported you can use the
Get-AzVM | gm -MemberType Properties
You can select different properties from there using the Select-Object command (Alias: Select). To retrieve the VMs from the specific ResourceGroup, use the below command.
Get-AzVM -ResourceGroupName AUTOMATIONTESTRG2
If your VM is in a different subscription then you need to switch the subscription and need to retrieve the VM list.
Advertisements