你当前正在访问 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 属性。
类型: | BatchAccountContext |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Filter
指定支持的映像的 OData 筛选器子句。 如果未指定筛选器,此 cmdlet 将返回 Batch 帐户支持的所有映像。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-MaxCount
指定要返回的最大受支持图像数。
类型: | Int32 |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |