Zarak1
Zarak1

Reputation: 113

How to Get Azure Windows VM plan info?

I'm looking for powershell command to get an Azure Windows VM plan info. I looked up Get-AzVM, but unable to find the required info.

Here's the property on azure portal, that I'm looking for

enter image description here

Upvotes: 0

Views: 1409

Answers (2)

user1000
user1000

Reputation: 21

Use the below query:

az vm show --name myvm  --resource-group test --query storageProfile.imageReference.sku

Upvotes: 1

Rahul Shukla
Rahul Shukla

Reputation: 716

Please find the below screenshot to get the vm plan information

CLI

az vm show --name myvm  --resource-group test --query storageProfile.imageReference.sku

enter image description here enter image description here

Powershell

Get-AzVM -ResourceGroupName test -Name myvm -Status | select OsName

enter image description here

To get the status of all vms in the resource group :

Get-AzVM -ResourceGroupName test -Status

enter image description here

If this solve your problem then mark this your answer 👍

Upvotes: 1

Related Questions