![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 get the Azure VM Size using Azure CLI in PowerShell?
To get the Azure VM size using Azure CLI, we first need to make sure that the Azure account is connected to the specific subscription for the VM that we need to retrieve the VM size.
To get the specific Azure VM size, we need to first retrieve the VM details and then need to run the JMESPATH query to retrieve the VM size.
az vm show -n VMname -g ResourceGroupName --query '[hardwareProfile.vmSize]' -otsv
you can also retrieve the size of the VM without resource group name, using “az vm list” command.
az vm list --query "[?name=='AzVM'].hardwareProfile.vmSize" -otsv
Advertisements