Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Get-AzureBatchJob

Get-AzureBatchJob

microsoft.azure.commands.batch.dll

Synopsis

Gets Azure Batch jobs under the specified workitem.

Syntax

Get-AzureBatchJob [-WorkItemName] [-BatchContext] [-Filter] [-MaxCount] [<CommonParameters>]

Get-AzureBatchJob [-WorkItemName] [-Name] [-BatchContext] [<CommonParameters>]

Get-AzureBatchJob [-WorkItem] [-BatchContext] [-Filter] [-MaxCount] [<CommonParameters>]

Detailed Description

Gets the Azure Batch jobs under the workitem specified by either the WorkItemName or WorkItem parameters. You can use the Name parameter to get a single job, or you can use the Filter parameter to get the jobs that match an OData filter.

Parameters

-BatchContext <BatchAccountContext>

The BatchAccountContext instance to use when interacting with the Batch service. Use the Get-AzureBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-Filter <string>

The OData filter clause to use when querying for jobs. If no filter is specified, then all jobs under the workitem specified with either the WorkItemName or WorkItem parameters will be returned.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-MaxCount <int>

The maximum number of jobs to return. If a value of 0 or less is specified, then no upper limit will be used. If no value is specified, a default value of 1000 will be used.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Name <string>

The name of the job to retrieve. Wildcards are not permitted.

Aliases

None

Required?

false

Position

2

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-WorkItem <PSCloudWorkItem>

The PSCloudWorkItem object representing the workitem which contains the jobs. Use the Get-AzureBatchWorkItem cmdlet to get a PSCloudWorkItem object.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-WorkItemName <string>

The name of the workitem which contains the jobs.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type

PSCloudJob

Notes

Examples

-------------------------- EXAMPLE 1 --------------------------

C:\PS>

Description

-----------

Gets the job named "job-0000000001" under the workitem named "myWorkItem".

        Get-AzureBatchJob -WorkItemName "myWorkItem" -Name "job-0000000001" -BatchContext $context

        CreationTime                : 3/24/2015 10:08:18 PM
        ExecutionInformation        : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionInformation
        JobConstraints              :
        JobManager                  :
        KeepAlive                   :
        LastModified                : 3/24/2015 10:08:18 PM
        Name                        : job-0000000001
        PoolLifeTimeOption          : Invalid
        PoolName                    : myPool
        PreviousState               : Invalid
        PreviousStateTransitionTime :
        Priority                    :
        State                       : Active
        StateTransitionTime         : 3/24/2015 10:08:18 PM
        Statistics                  :
        Url                         : https://cmdletexample.batch-test.windows-int.net/workitems/myWorkItem/jobs/job-0000000001
      

-------------------------- EXAMPLE 2 --------------------------

C:\PS>

Description

-----------

Gets the active jobs under the workitem named "myWorkItem".

        Get-AzureBatchJob -WorkItemName "myWorkItem" -Filter "state eq 'active'" -BatchContext $context

        CreationTime                : 3/24/2015 10:08:18 PM
        ExecutionInformation        : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionInformation
        JobConstraints              :
        JobManager                  :
        KeepAlive                   :
        LastModified                : 3/24/2015 10:08:18 PM
        Name                        : job-0000000001
        PoolLifeTimeOption          : Invalid
        PoolName                    : myPool
        PreviousState               : Invalid
        PreviousStateTransitionTime :
        Priority                    :
        State                       : Active
        StateTransitionTime         : 3/24/2015 10:08:18 PM
        Statistics                  :
        Url                         : https://cmdletexample.batch-test.windows-int.net/workitems/myWorkItem/jobs/job-0000000001
      

-------------------------- EXAMPLE 3 --------------------------

C:\PS>

Description

-----------

Gets all jobs under the workitem named "myWorkItem".

        Get-AzureBatchWorkItem -Name "myWorkItem" -BatchContext $context | Get-AzureBatchJob -BatchContext $context

        CreationTime                : 3/24/2015 10:08:18 PM
        ExecutionInformation        : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionInformation
        JobConstraints              :
        JobManager                  :
        KeepAlive                   :
        LastModified                : 3/24/2015 10:08:18 PM
        Name                        : job-0000000001
        PoolLifeTimeOption          : Invalid
        PoolName                    : myPool
        PreviousState               : Invalid
        PreviousStateTransitionTime :
        Priority                    :
        State                       : Active
        StateTransitionTime         : 3/24/2015 10:08:18 PM
        Statistics                  :
        Url                         : https://cmdletexample.batch-test.windows-int.net/workitems/myWorkItem/jobs/job-0000000001