Reputation: 113
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
Upvotes: 0
Views: 1409
Reputation: 21
Use the below query:
az vm show --name myvm --resource-group test --query storageProfile.imageReference.sku
Upvotes: 1
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
Powershell
Get-AzVM -ResourceGroupName test -Name myvm -Status | select OsName
To get the status of all vms in the resource group :
Get-AzVM -ResourceGroupName test -Status
If this solve your problem then mark this your answer 👍
Upvotes: 1