The Get-AzBatchSubtask cmdlet retrieves the subtask information about the specified task.
Subtasks provide parallel processing for individual tasks, and enable precise monitoring of task execution and progress.
Examples
Example 1: Return all subtasks for a specified task
These commands return all the subtasks for the task with the ID myTask.
To do this, the first command in the example creates an object reference to the account keys for the batch account contosobatchaccount.
This object reference is stored in a variable named $context.
The second command then uses that object reference and the Get-AzBatchSubtask cmdlet to return all the subtasks for myTask, a task that runs as part of job Job-01.
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.
Specifies the maximum number of subtasks to return.
If you specify a value of zero (0) or less, the cmdlet does not use an upper limit.
The default value is 1000.
Specifies an object reference to the task that contain the subtasks that this cmdlet returns.
This object reference is created by using the Get-AzBatchTask cmdlet and storing the returned object in a variable.
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.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.