Azure Virtual Machine Size Information on Powershell

泪湿孤枕 提交于 2019-12-07 20:14:49

问题


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:


回答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.




回答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 }


来源:https://stackoverflow.com/questions/29285470/azure-virtual-machine-size-information-on-powershell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!