如何找到 Azure 图像大小?

How to find the Azure image size?

在 Azure 中,我从 VM 创建了一个图像,如下所示。 我想检查图像大小,但我无法从门户网站上找到它。我还检查了 Az Powershell 和 az cli,但我没有看到任何命令给我它的大小。有没有办法获取此信息?

您可以使用:

$resourceId = "" # The resource ID of your image
$i=Get-AzureRmResource -ResourceId $resourceId
$diskSize = $i.Properties.storageProfile.osDisk.diskSizeGB