0

I am trying to check the availability size of virtual machines in one region.

The command: Get-AzVMSize -ResourceGroupName RG3 -AvailabilitySetName availabilitysets

However, it appears this error :-

Get-AzVMSize is not recognized as an internal and external command.

Kindly please help. Thanks

enter image description here

Jennie
  • 45
  • 1
  • 9
  • I have created 2 virtual machines in an availability sets. However, I need to verify them in a virtual machine. The error is shown above. tq – Jennie Apr 08 '22 at 06:52
  • Same here@jennie, We can get the vm sizes by passing the VM name(VM1 or VM2) using the below command as shown in answer . – AjayKumarGhose Apr 08 '22 at 07:33

1 Answers1

0

We have tried to Getvmsize using below steps:

Make sure to Connected with Azure using Connect-AzAccount.

Then run the following command to list the vm sizes using availability sets name

Get-AzVMSize -ResourceGroupName "myrgname" -AvailabilitySetName "myavsetname"

&

Get-AzVMSize -ResourceGroupName "myrgname" -VMName "myvmname"

OUTPUT SCREENSHOT FOR REFERENCE:-

enter image description here enter image description here


enter image description here

For more information please refer this MICROSOFT DOCUMENTATION|Get-AzVMSize

AjayKumarGhose
  • 4,257
  • 2
  • 4
  • 15