如何使用 PowerShell 獲取特定位置可用的 Azure 映像釋出者?


你可以從 Azure 市場上獲取 Azure 映像和釋出者名稱。若要使用 PowerShell 獲取特定位置可用的 Azure 映像釋出者,我們可以使用 Get-AzVmImagePublisher 命令並需要提供獲取可用釋出者所需的位置。

例如:

PS C:\> Get-AzVMImagePublisher -Location Eastus

上述命令將獲取該位置可用所有的映像釋出者。若要僅獲取釋出者,你可以篩選輸出。

PS C:\> Get-AzVMImagePublisher -Location Eastus | Select PublisherName

輸出

xcontentptyltd-1329748
xendata-inc
xfinityinc
xilinx
xoriantsolutionspvtltd
xtremedata
xyzrd-group-ou
yellowfin
yellowfininternationalptyltd1616363974066
yokogawarentalleasecorporation
your-shop-online

你可以按如下所示篩選特定釋出者。

PS C:\> Get-AzVMImagePublisher -Location Eastus | where{$_.PublisherName -like
"Microsoft*"}

或對於 RedHat

PS C:\> Get-AzVMImagePublisher -Location Eastus | where{$_.PublisherName -like
"Redhat*"}

更新於: 2021-09-02

247 次瀏覽

開啟你的 職業生涯

完成課程即可獲得認證

開始
廣告
© . All rights reserved.