Restart-AzBatchComputeNode
重新啟動指定的計算節點。
語法
Restart-AzBatchComputeNode
[-PoolId] <String>
[-Id] <String>
[[-RebootOption] <ComputeNodeRebootOption>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Restart-AzBatchComputeNode
[[-ComputeNode] <PSComputeNode>]
[[-RebootOption] <ComputeNodeRebootOption>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Restart-AzBatchComputeNode Cmdlet 會重新啟動指定的計算節點。
範例
範例 1:重新啟動計算節點
Restart-AzBatchComputeNode -PoolId "MyPool" -Id "tvm-3257026573_2-20150813t200938z" -BatchContext $Context
此命令會重新啟動集區 MyPool 中標識符為 “tvm-3257026573_2-20150813t200938z” 的計算節點。
範例 2:重新啟動集區中的每個計算節點
Get-AzBatchComputeNode -PoolId "MyPool" -BatchContext $Context | Restart-AzBatchComputeNode -BatchContext $Context
此命令會重新啟動集區 MyPool 中的每個計算節點。
參數
-BatchContext
指定此 Cmdlet 用來與 Batch 服務互動的 BatchAccountContext 實例。 如果您使用 Get-AzBatchAccount Cmdlet 來取得 BatchAccountContext,則與 Batch 服務互動時,將會使用Microsoft Entra 驗證。 若要改用共用密鑰驗證,請使用 Get-AzBatchAccountKey Cmdlet 來取得已填入其存取金鑰的 BatchAccountContext 物件。 使用共用金鑰驗證時,預設會使用主要存取金鑰。 若要變更要使用的密鑰,請設定 BatchAccountContext.KeyInUse 屬性。
類型: | BatchAccountContext |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ComputeNode
指定要重新啟動的計算節點 PSComputeNode 物件。
類型: | PSComputeNode |
Position: | 0 |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Id
指定要重新啟動的計算節點識別碼。
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-PoolId
指定包含計算節點的集區識別碼。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-RebootOption
指定何時重新啟動節點,以及目前執行中工作的動作。 預設值為 Requeue。
類型: | Nullable<T>[ComputeNodeRebootOption] |
接受的值: | Requeue, Terminate, TaskCompletion, RetainedData |
Position: | 2 |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |