你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get-AzBatchSupportedImage

获取 Batch 帐户支持的 Batch 映像。

语法

Get-AzBatchSupportedImage
   [-Filter <String>]
   [-MaxCount <Int32>]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

说明

Get-AzBatchSupportedImage cmdlet 获取 Azure Batch 帐户中提供的受支持虚拟机映像。 使用 BatchContext 参数指定帐户。

示例

示例 1:获取所有可用的受支持映像

$Context = Get-AzBatchAccountKey -AccountName "ContosoBatchAccount"
Get-AzBatchSupportedImage -BatchContext $Context

BatchSupportEndOfLife :
Capabilities          :
ImageReference        : canonical:ubuntuserver:16.04-lts:latest
NodeAgentSkuId        : batch.node.ubuntu 16.04
OSType                : Linux
VerificationType      : Verified

BatchSupportEndOfLife :
Capabilities          :
ImageReference        : canonical:ubuntuserver:18.04-lts:latest
NodeAgentSkuId        : batch.node.ubuntu 18.04
OSType                : Linux
VerificationType      : Verified

BatchSupportEndOfLife :
Capabilities          :
ImageReference        : credativ:debian:8:latest
NodeAgentSkuId        : batch.node.debian 8
OSType                : Linux
VerificationType      : Verified

BatchSupportEndOfLife :
Capabilities          :
ImageReference        : microsoftwindowsserver:windowsserver:2016-datacenter:latest
NodeAgentSkuId        : batch.node.windows amd64
OSType                : Windows
VerificationType      : Verified

...

第一个命令使用 Get-AzBatchAccountKey 获取包含订阅访问密钥的 Batch 帐户上下文。 该命令将上下文存储在下一个命令中使用的$Context变量中。 第二个命令获取该 Batch 帐户的所有可用受支持映像。

参数

-BatchContext

与 Batch 服务交互时要使用的 BatchAccountContext 实例。 如果使用 Get-AzBatchAccount cmdlet 获取 BatchAccountContext,则在与 Batch 服务交互时将使用 Microsoft Entra 身份验证。 若要改用共享密钥身份验证,请使用 Get-AzBatchAccountKey cmdlet 获取填充其访问密钥的 BatchAccountContext 对象。 使用共享密钥身份验证时,默认使用主访问密钥。 若要更改要使用的密钥,请设置 BatchAccountContext.KeyInUse 属性。

Type:BatchAccountContext
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

用于与 Azure 通信的凭据、帐户、租户和订阅。

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Filter

指定支持的映像的 OData 筛选器子句。 如果未指定筛选器,此 cmdlet 将返回 Batch 帐户支持的所有映像。

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MaxCount

指定要返回的最大受支持图像数。

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

输入

BatchAccountContext

输出

PSImageInformation