Enable-AzBatchComputeNodeScheduling
Enables task scheduling on the specified compute node.
Syntax
Id (Default)
Enable-AzBatchComputeNodeScheduling
[-PoolId] <String>
[-Id] <String>
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
InputObject
Enable-AzBatchComputeNodeScheduling
[[-ComputeNode] <PSComputeNode>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Enable-AzBatchComputeNodeScheduling cmdlet enables task scheduling on the specified compute node. A compute node is an Azure virtual machine dedicated to a specific application workload.
Examples
Example 1: Enable task scheduling on a compute node
$Context = Get-AzBatchAccountKey -AccountName "contosobatchaccount"
Enable-AzBatchComputeNodeScheduling -PoolId "myPool" -Id "tvm-1783593343_34-20151117t222514z" -BatchContext $Context
These commands enable task scheduling on the compute node tvm-1783593343_34-20151117t222514z. To do this, the first command in the example creates an object reference containing the account keys for the batch account contosobatchaccount. This object reference is stored in a variable named $context. The second command then uses this object reference and the Enable-AzBatchComputeNodeScheduling cmdlet to connect to the pool myPool and enable task scheduling on tvm-1783593343_34-20151117t222514z.
Example 2: Enable task scheduling on compute nodes in a pool
$Context = Get-AzBatchAccountKey -AccountName "contosobatchaccount"
Get-AzBatchComputeNode -PoolId "Pool06" -BatchContext $Context | Enable-AzBatchComputeNodeScheduling -BatchContext $Context
These commands enable task scheduling on all the compute nodes found in the pool Pool06. To perform this task, the first command in the example creates an object reference containing the account keys for the batch account contosobatchaccount. This object reference is stored in a variable named $context. The second command in the example then uses this object reference and Get-AzBatchComputeNode to return a collection of all the compute nodes found in Pool06. That collection is then piped to the Enable-AzBatchComputeNodeScheduling cmdlet, which enables task scheduling on each compute node in the collection.
Parameters
-BatchContext
Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the Get-AzBatchAccount cmdlet to get your BatchAccountContext, then Microsoft Entra authentication will be used when interacting with the Batch service. To use shared key authentication instead, use the Get-AzBatchAccountKey cmdlet to get a BatchAccountContext object with its access keys populated. When using shared key authentication, the primary access key is used by default. To change the key to use, set the BatchAccountContext.KeyInUse property.
Parameter properties
Type: | BatchAccountContext |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ComputeNode
Specifies an object reference to the compute node where task scheduling is enabled. This object reference is created by using the Get-AzBatchComputeNode cmdlet and storing the returned compute node object in a variable.
Parameter properties
Type: | PSComputeNode |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
InputObject
Position: | 0 |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Id
Specifies the ID of the compute node where task scheduling is enabled.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Id
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PoolId
Specifies the ID of the batch pool that contains the compute node where task scheduling is enabled.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Id
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.