< Back

Get-AzureBatchTaskCounts

Tue Jan 29, 2019 9:35 pm

NAME Get-AzureBatchTaskCounts



SYNOPSIS

Gets the task counts for the specified job.





SYNTAX

Get-AzureBatchTaskCounts [[-Job] <PSCloudJob>] -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]



Get-AzureBatchTaskCounts [-JobId] <String> -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]





DESCRIPTION

The Get-AzureBatchTaskCounts cmdlet gets the Azure Batch tasks count for a Batch job. Specify a job by either the JobId parameter or the Job

parameter. Task counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed.

Tasks in the preparing state are counted as running. If the validationStatus is unvalidated, then the Batch service has not been able to check

state counts against the task states as reported in the List Tasks API. The validationStatus may be unvalidated if the job contains more than

200,000 tasks.





PARAMETERS

-BatchContext <BatchAccountContext>

The BatchAccountContext instance to use when interacting 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



-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



-Job <PSCloudJob>

Specifies the job that contains tasks that this cmdlet gets. To obtain a PSCloudJob object, use the Get-AzureBatchJob cmdlet.



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-JobId <String>

The id of the job for which to get task counts.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

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

System.String

Microsoft.Azure.Commands.Batch.Models.PSCloudJob Microsoft.Azure.Commands.Batch.BatchAccountContext





OUTPUTS

Microsoft.Azure.Commands.Batch.Models.PSTaskCounts







NOTES









Example 1: Get task counts by ID



PS C:\\> Get-AzureBatchTaskCounts -JobId "Job01" -Id "Task03" -BatchContext $Context

Active : 1

Completed : 0

Failed : 0

Running : 1

Succeeded : 5

ValidationStatus : Validated



This command gets the task counts for job Job01. Use the Get-AzureRmBatchAccountKeys cmdlet to assign a context to the $Context variable.







RELATED LINKS

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

Get-AzureRmBatchAccountKeys

Get-AzureBatchJob

Azure Batch Cmdlets