Get-AzBatchRemoteLoginSetting
取得計算節點的遠端登錄設定。
Syntax
Get-AzBatchRemoteLoginSetting
[-PoolId] <String>
[-ComputeNodeId] <String>
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzBatchRemoteLoginSetting
[[-ComputeNode] <PSComputeNode>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Get-AzBatchRemoteLoginSetting Cmdlet 會取得虛擬機基礎結構集區中計算節點的遠端登錄設定。
範例
範例 1:取得集區中所有節點的遠端登錄設定
$Context = Get-AzBatchAccountKey -AccountName "ContosoBatchAccount"
Get-AzBatchComputeNode -PoolId "ContosoPool" -BatchContext $Context | Get-AzBatchRemoteLoginSetting -BatchContext $Context
IPAddress Port
--------- ----
10.214.75.221 50002
10.214.75.221 50001
10.214.75.221 50000
第一個命令會取得批次帳戶內容,其中包含您訂用帳戶的存取密鑰,方法是使用 Get-AzBatchAccountKey。 命令會將內容儲存在$Context變數中,以在下一個命令中使用。 第二個命令會使用 Get-AzBatchComputeNode 取得集區中標識碼為 ContosoPool 的每個計算節點。 命令會使用管線運算符,將每部計算機節點傳遞至目前的 Cmdlet。 命令會取得每個計算節點的遠端登錄設定。
範例 2:取得節點的遠端登錄設定
$Context = Get-AzBatchAccountKey -AccountName "ContosoBatchAccount"
Get-AzBatchRemoteLoginSetting -PoolId "ContosoPool" -ComputeNodeId "tvm-1900272697_1-20150330t205553z" -BatchContext $Context
IPAddress Port
--------- ----
10.214.75.221 50000
第一個命令會取得批次帳戶內容,其中包含您訂用帳戶的存取密鑰,然後將它儲存在$Context變數中。 第二個命令會取得具有標識碼 ContosoPool 集區中指定標識碼之計算節點的遠端登錄設定。
參數
-BatchContext
指定 此 Cmdlet 用來與 Batch 服務互動的 BatchAccountContext 實例。 若要取得 包含訂用帳戶存取密鑰的 BatchAccountContext ,請使用 Get-AzBatchAccountKey Cmdlet。
Type: | BatchAccountContext |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ComputeNode
指定計算節點作為 PSComputeNode 物件,此 Cmdlet 會取得遠端登錄設定。 若要取得計算節點物件,請使用 Get-AzBatchComputeNode Cmdlet。
Type: | PSComputeNode |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ComputeNodeId
指定要取得遠端登錄設定之計算節點的識別碼。 此 Cmdlet 會取得遠端登錄設定。
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
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 |
-PoolId
指定包含虛擬機的集區標識碼。
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
輸入
輸出
相關連結
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應