Azure Virtual Machine Size Information on Powershell

10,399

Solution 1

Try Get-AzureRoleSize. This will give you some of the information you're looking for. It won't include the pricing as pricing depends on a number of other factors like the kind of subscription you have.

enter image description here

Solution 2

Basically to get all of them:

Get all Available VM Sizes in "East US":

$Sizes = (Get-AzureLocation | Where-Object { $_.name -eq "East US"}).VirtualMachineRoleSizes

List all properties of specific VM size:

foreach ($Size in $Sizes) { Get-AzureRoleSize -InstanceSize $Size }
Share:
10,399
TassadarCRG
Author by

TassadarCRG

Updated on June 05, 2022

Comments

  • TassadarCRG
    TassadarCRG almost 2 years

    I wondering if there are any method (query) on Powershell to retrieve/get the specs of the different VM sizes on Azure besides the Role Size Name.

    I need: number of cores and disk, RAM, S.O, and the price per month or per min, any other information is welcome :D.

    Something like the picture show:

    enter image description here

  • TassadarCRG
    TassadarCRG about 9 years
    Awesome, I really forget that Cmdlet, thx! About the price, is suppossed that we already set an Azure supcription to use many of the Azure cmdlets, what else I need to know in order to retrive that prices or to do the calculation by myself.
  • Gaurav Mantri
    Gaurav Mantri about 9 years
    I think you would need to do pricing calculation yourself. For example, the pricing is different if you create a VM in US v/s same VM in Asia.
  • TassadarCRG
    TassadarCRG about 9 years
    Yes, Actually I need the pricing from one specific location.
  • Gaurav Mantri
    Gaurav Mantri about 9 years
    AFAIK, I don't think there is a Cmdlet that will give you the pricing. Wait for billing API maybe?
  • TassadarCRG
    TassadarCRG about 9 years
    What I need to do is display that pricing in an application, the app display diferent VM configurations (VM Size specs and the image that will be installed) in order to automate de VM creation. For Example : VM1: Size A1 (display the A1 config), Image :Windows Server 2008. Price $10/month VM2: Size A2 (display the A2 config), Image :Windows Server 2008. Price $30/month VM3: Size A2 (display the A2 config), Image :Windows Server 2012. Price $30/month
  • Bruno Faria
    Bruno Faria about 9 years
    Unfortunately there's no cmdlet or api to get the price yet =\