
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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