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.
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 }
Author by
TassadarCRG
Updated on June 05, 2022Comments
-
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:
-
TassadarCRG about 9 yearsAwesome, 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 about 9 yearsI 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 about 9 yearsYes, Actually I need the pricing from one specific location.
-
Gaurav Mantri about 9 yearsAFAIK, I don't think there is a Cmdlet that will give you the pricing. Wait for billing API maybe?
-
TassadarCRG about 9 yearsWhat 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 about 9 yearsUnfortunately there's no cmdlet or api to get the price yet =\