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

Get-AzBatchSupportedImage

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

语法

Default (默认值)

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,Microsoft 则在与 Batch 服务交互时将使用 entra 身份验证。 若要改用共享密钥身份验证,请使用 Get-AzBatchAccountKey cmdlet 获取填充其访问密钥的 BatchAccountContext 对象。 使用共享密钥身份验证时,默认使用主访问密钥。 若要更改要使用的密钥,请设置 BatchAccountContext.KeyInUse 属性。

参数属性

类型:BatchAccountContext
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DefaultProfile

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

参数属性

类型:IAzureContextContainer
默认值:None
支持通配符:False
不显示:False
别名:AzContext, AzureRmContext, AzureCredential

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Filter

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

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-MaxCount

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

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

BatchAccountContext

输出

PSImageInformation