Search code examples
azureazure-powershellazure-availability-set

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

  • 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