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-AzureBatchWorkItem

Get-AzureBatchWorkItem

microsoft.azure.commands.batch.dll

Synopsis

Gets Azure Batch workitems under the specified Batch account.

Syntax

Get-AzureBatchWorkItem [-BatchContext] [-Filter] [-MaxCount] [<CommonParameters>]

Get-AzureBatchWorkItem [-Name] [-BatchContext] [<CommonParameters>]

Detailed Description

Gets the Azure Batch workitems under the Batch account specified with the BatchContext parameter. You can use the Name parameter to get a single workitem, or you can use the Filter parameter to get the workitems 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 workitems. If no filter is specified, then all workitems under the Batch account specified with the BatchContext parameter 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 workitems 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 workitem to retrieve. Wildcards are not permitted.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByValue, ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type

PSCloudWorkItem

Notes

Examples

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

C:\PS>

Description

-----------

Gets the workitem named "myWorkItem".

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

        CreationTime                : 3/24/2015 10:08:17 PM
        ExecutionInformation        : Microsoft.Azure.Commands.Batch.Models.PSWorkItemExecutionInformation
        JobExecutionEnvironment     : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionEnvironment
        JobSpecification            :
        LastModified                : 3/24/2015 10:08:17 PM
        Metadata                    :
        Name                        : myWorkItem
        PreviousState               : Invalid
        PreviousStateTransitionTime :
        Schedule                    :
        State                       : Active
        StateTransitionTime         : 3/24/2015 10:08:17 PM
        Statistics                  :
        Url                         : https://cmdletexample.batch-test.windows-int.net/workitems/myWorkItem
      

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

C:\PS>

Description

-----------

Gets the workitems whose names start with "my" by using the Filter parameter.

        Get-AzureBatchWorkItem -Filter "startswith(name,'my')" -BatchContext $context

        CreationTime                : 3/24/2015 10:08:17 PM
        ExecutionInformation        : Microsoft.Azure.Commands.Batch.Models.PSWorkItemExecutionInformation
        JobExecutionEnvironment     : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionEnvironment
        JobSpecification            :
        LastModified                : 3/24/2015 10:08:17 PM
        Metadata                    :
        Name                        : myWorkItem
        PreviousState               : Invalid
        PreviousStateTransitionTime :
        Schedule                    :
        State                       : Active
        StateTransitionTime         : 3/24/2015 10:08:17 PM
        Statistics                  :
        Url                         : https://cmdletexample.batch-test.windows-int.net/workitems/myWorkItem

        CreationTime                : 3/24/2015 10:12:23 PM
        ExecutionInformation        : Microsoft.Azure.Commands.Batch.Models.PSWorkItemExecutionInformation
        JobExecutionEnvironment     : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionEnvironment
        JobSpecification            :
        LastModified                : 3/24/2015 10:12:23 PM
        Metadata                    :
        Name                        : myWorkItem2
        PreviousState               : Invalid
        PreviousStateTransitionTime :
        Schedule                    :
        State                       : Active
        StateTransitionTime         : 3/24/2015 10:12:23 PM
        Statistics                  :
        Url                         : https://cmdletexample.batch-test.windows-int.net/workitems/myWorkItem2