如何获取Azure数据磁盘类型即HDD / SSD?

时间:2018-11-13 21:20:50

标签: azure-disk

能否请您帮助我获取同样适用于Azure托管磁盘的磁盘类型。下面我只得到Premium_LRS和Standard_LRS。但是我还要求磁盘也是 “ HDD或SSD”

$Disks = Get-AzureRmDisk -ResourceGroupName $RG.ResourceGroupName  | select Name,ResourceGroupName,Sku

foreach ($Disk in $Disks) {
$Name = $Disk.Name
$RG = $Disk.ResourceGroupName

$Final = Get-AzureRmDisk -ResourceGroupName $RG -DiskName $Name | select Name,ResourceGroupName,ManagedBy

$VM = $Final.ManagedBy


$vmrg = $Final.ResourceGroupName

$VmName = ($VM -split '/')[8]

$Type = (Get-AzureRmDisk -ResourceGroupName $RG -DiskName $Name).Type.GetType

Write-Host -Separator "                     ” $VmName $VMsize $vmrg $Final.Name $Type

}

0 个答案:

没有答案