如何使用 PowerShell 中的 Azure CLI 獲取所有可用的 Azure VM 映像?


若要使用 Azure CLI 獲取所有可用的 Azure VM 映像,可以使用 az vm image 命令。

下面的命令將檢索市場中所有可用的 Azure 映像。

PS C:\> az vm image list --all

上述命令需要一些時間來檢索輸出。若要獲取表格格式的輸出,請使用以下命令。

PS C:\> az vm image list --all -otable

若要從特定位置檢索映像,請使用**-l** 或 **--location** 引數。

PS C:\> az vm image list -l eastus -otable

輸出

若要從特定發行商處獲取 VM 映像,

PS C:\> az vm image list -l eastus -p MicrosoftWindowsServer --all -otable

更新於:2021 年 9 月 2 日

2000+ 次瀏覽

開始您的 職業

透過完成該課程獲得認證

開始
廣告
© . All rights reserved.