如何识别特定订阅ID的图像列表可在azure中访问

时间:2015-11-20 06:28:12

标签: powershell azure

我可以使用此命令获取特定订阅ID的图像列表。

Get-AzureVMImage | Where-Object {($_.Label -ne $null) -and
($_.Label.Contains('2012 R2')) -and
($_.PublisherName.Contains("Microsoft Windows Server Group"))} |
Sort-Object PublishedDate[-1]

如果假设无法访问获取的图像并将错误抛出为Forbidden error

0 个答案:

没有答案