共用方式為


Get-AzBatchSupportedImage

取得 Batch 帳戶的 Batch 支援映像。

語法

Default (預設值)

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

Description

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
預設值: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