Reset-AzBatchComputeNode
在指定的计算节点上重新安装作系统。
语法
Reset-AzBatchComputeNode
[-PoolId] <String>
[-Id] <String>
[-ReimageOption <ComputeNodeReimageOption>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Reset-AzBatchComputeNode
[[-ComputeNode] <PSComputeNode>]
[-ReimageOption <ComputeNodeReimageOption>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Reset-AzBatchComputeNode cmdlet 在指定的计算节点上重新安装作系统。
示例
示例 1:重置节点映像
Reset-AzBatchComputeNode -PoolId "MyPool" -Id "tvm-3257026573_2-20150813t200938z" -BatchContext $Context
此命令会重新映像名为 MyPool 的池中 ID 为“tvm-3257026573_2-20150813t200938z”的计算节点。 使用 Get-AzBatchAccountKey cmdlet 将上下文分配给$Context变量。
示例 2:重置池中的所有节点的映像
Get-AzBatchComputeNode -PoolId "MyPool" -BatchContext $Context | Reset-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
指定要重置映像的计算节点的 ID。
类型: | String |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-PoolId
指定包含计算节点的池的 ID。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ReimageOption
指定何时重新映像节点以及当前正在运行的任务要执行的作。 默认值为“重新排队”。
类型: | Nullable<T>[ComputeNodeReimageOption] |
接受的值: | Requeue, Terminate, TaskCompletion, RetainedData |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |