< Back

Enable-AzureBatchComputeNodeScheduling

Tue Jan 29, 2019 9:35 pm

NAME Enable-AzureBatchComputeNodeScheduling



SYNOPSIS

Enables task scheduling on the specified compute node.





SYNTAX

Enable-AzureBatchComputeNodeScheduling [[-ComputeNode] <PSComputeNode>] -BatchContext <BatchAccountContext> [-DefaultProfile

<IAzureContextContainer>] [<CommonParameters>]



Enable-AzureBatchComputeNodeScheduling [-PoolId] <String> [-Id] <String> -BatchContext <BatchAccountContext> [-DefaultProfile

<IAzureContextContainer>] [<CommonParameters>]





DESCRIPTION

The Enable-AzureBatchComputeNodeScheduling cmdlet enables task scheduling on the specified compute node. A compute node is an Azure virtual

machine dedicated to a specific application workload.





PARAMETERS

-BatchContext <BatchAccountContext>

Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the Get-AzureRmBatchAccount

cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be used when interacting with the Batch service. To

use shared key authentication instead, use the Get-AzureRmBatchAccountKeys 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.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ComputeNode <PSComputeNode>

Specifies an object reference to the compute node where task scheduling is enabled. This object reference is created by using the

Get-AzureBatchComputeNode cmdlet and storing the returned compute node object in a variable.



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Id <String>

Specifies the ID of the compute node where task scheduling is enabled.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PoolId <String>

Specifies the ID of the batch pool that contains the compute node where task scheduling is enabled.



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

BatchAccountContext

Parameter 'BatchContext' accepts value of type 'BatchAccountContext' from the pipeline



PSComputeNode

Parameter 'ComputeNode' accepts value of type 'PSComputeNode' from the pipeline





OUTPUTS



NOTES









Example 1: Enable task scheduling on a compute node



PS C:\\>$Context = Get-AzureRmBatchAccountKeys -AccountName "contosobatchaccount"

PS C:\\> Enable-AzureBatchComputeNodeScheduling -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-AzureBatchComputeNodeScheduling 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



PS C:\\>$Context = Get-AzureRmBatchAccountKeys -AccountName "contosobatchaccount"

PS C:\\> Get-AzureBatchComputeNode -PoolId "Pool06" -BatchContext $Context | Enable-AzureBatchComputeNodeScheduling -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-AzureBatchComputeNode to return a collection of all the compute nodes

found in Pool06. That collection is then piped to the Enable-AzureBatchComputeNodeScheduling cmdlet, which enables task scheduling on each compute

node in the collection.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... scheduling

Disable-AzureBatchComputeNodeScheduling