Get-WASJobInstance
Get-WASJobInstance
Gets a list of job instances.
Syntax
Parameter Set: FindByJob
Get-WASJobInstance [-Job] <WASJob[]> [[-Runtag] <String> ] [[-Testpass] <String> ] [ <CommonParameters>]
Parameter Set: FindByJobInstance
Get-WASJobInstance [-JobInstance] <WASJobInstance[]> [ <CommonParameters>]
Detailed 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.
Parameters
-Job<WASJob[]>
Specifies the job object for which to retrieve job instances. This is a required parameter.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-JobInstance<WASJobInstance[]>
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.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Runtag<String>
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.
Aliases |
none |
Required? |
false |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Testpass<String>
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.
Aliases |
none |
Required? |
false |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Get all job instances for a 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.
PS C:\> $job = Get-WASJob -JobName *automated*
Get-GetJobInstance -Job $job
Example 2: Get all running job instances for a 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 that are currently running for the job.
PS C:\> $job = Get-WASJob -JobName *automated*
PS C:\> Get-WASJobInstance -Job $job | where {$_.IsComplete -eq $false }
Example 3: Get all running job instances
This command gets all the jobs that are currently running using server.
PS C:\> $job = Get-WASJob | Get-WASJobInstance | where {$_.IsComplete -eq $false}