2

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

jobin
  • 2,600
  • 7
  • 32
  • 59
TassadarCRG
  • 91
  • 1
  • 2
  • 12

2 Answers2

6

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

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • 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. – TassadarCRG Mar 26 '15 at 18:21
  • 1
    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. – Gaurav Mantri Mar 26 '15 at 18:25
  • Yes, Actually I need the pricing from one specific location. – TassadarCRG Mar 26 '15 at 18:28
  • AFAIK, I don't think there is a Cmdlet that will give you the pricing. Wait for billing API maybe? – Gaurav Mantri Mar 26 '15 at 18:31
  • 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 – TassadarCRG Mar 26 '15 at 18:39
  • Unfortunately there's no cmdlet or api to get the price yet =\ – Bruno Faria Mar 26 '15 at 19:32
5

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 }
Bruno Faria
  • 5,219
  • 3
  • 24
  • 27