如何使用 PowerShell 获取特定位置可用的 Azure 镜像发布者?
powershellmicrosoft technologiessoftware & coding更新于 2026/2/12 15:52:17
您可以从 Azure MarketPlace 获取 Azure 镜像和发布者名称。要使用 PowerShell 获取特定位置可用的 Azure 镜像发布者,我们可以使用 GetAzVMImagePublisher 命令,并需要提供位置信息才能获取可用的发布者。
例如:
PS C:\> Get-AzVMImagePublisher -Location Eastus
上述命令将获取该位置所有可用的镜像发布者。如果只想获取发布者,您可以过滤输出。
PS C:\> Get-AzVMImagePublisher -Location Eastus | Select Publisher
输出
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*"}

