'Cannot check the size of virtual machines in one region

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



Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1