Get-WASJobInstance

Gets a list of job instances.

Syntax

Get-WASJobInstance
   [-Job] <WASJob[]>
   [[-Runtag] <String>]
   [[-Testpass] <String>]
   [<CommonParameters>]
Get-WASJobInstance
   [-JobInstance] <WASJobInstance[]>
   [<CommonParameters>]

Description

The Get-WASJobInstance cmdlet gets a list of job instances associated with a specific job, and displays metadata for each job instance. The Job parameter is required.

Examples

Example 1: Get all job instances for a job

PS C:\>$job = Get-WASJob -JobName *automated*
Get-GetJobInstance -Job $job

This command gets all the jobs with "automated" in the job name, assigns it to a variable, and then gets all the job instances for the job.

Example 2: Get all running job instances for a job

PS C:\> $job = Get-WASJob -JobName *automated*
PS C:\> Get-WASJobInstance -Job $job | where {$_.IsComplete -eq $false }

This command gets all the jobs with "automated" in the job name, assigns it to a variable, and then gets all the job instances that are currently running for the job.

Example 3: Get all running job instances

PS C:\> $job = Get-WASJob | Get-WASJobInstance | where {$_.IsComplete -eq $false}

This command gets all the jobs that are currently running using dep_nextref_was server.

Parameters

-Job

Specifies the job object for which to retrieve job instances. This is a required parameter.

Type:WASJob[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-JobInstance

Specifies the job instance for which to retrieve an updated object. You can pass a job instance of itself to get an update or copy of the job instance object.

Type:WASJobInstance[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Runtag

Specifies the run tag for the job instance you want to get. The full name of the run tag isn't required. Wildcards are accepted. If this parameter isn't specified, all job instances are listed.

Type:String
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Testpass

Specifies the test pass for the job instance you want to get. The full name of the test pass isn't required. Wildcards are accepted. If this parameter isn't specified, all job instances are listed.

Type:String
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False