Get-AdtJobInstance
Synopsis
Gets instances (runs) of adTempus jobs.
Syntax
Job (Default)
Get-AdtJobInstance [[-Job] <Job[]>] [-InstanceId <int[]>] [-Status <JobState[]>] [-Active]
[-Since <datetime>] [-Newest <int>] [-Connection <AdtConnection>] [-Server <string>]
[-Credential <pscredential>]
Name
Get-AdtJobInstance -Name <string[]> [-InstanceId <int[]>] [-Status <JobState[]>] [-Active]
[-Since <datetime>] [-Newest <int>] [-Connection <AdtConnection>] [-Server <string>]
[-Credential <pscredential>]
Description
Gets job instances from the job history. Use -Active to get only instances that are pending or running.
Examples
Example 1
Get-AdtJob Load* | Get-AdtJobInstance -Active
Gets the running instances of jobs whose names start with "Load".
Parameters
-Active
Gets only instances that are pending or running.
| Type | SwitchParameter |
|---|---|
| Required | False |
| Position | Named |
| Default value | False |
| Accept pipeline input | False |
| Accept wildcard characters | False |
-Connection
The connection to use. See Connect-AdtServer.
| Type | AdtConnection |
|---|---|
| Required | False |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
-Credential
The credential used to connect to the -Server.
| Type | PSCredential |
|---|---|
| Required | False |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
-InstanceId
The instance numbers to get.
| Type | Int32[] |
|---|---|
| Required | False |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
-Job
The jobs to get instances for. If omitted, instances of all jobs are returned.
| Type | Job[] |
|---|---|
| Parameter sets | Job |
| Required | False |
| Position | 0 |
| Default value | None |
| Accept pipeline input | True (ByValue) |
| Accept wildcard characters | False |
-Name
The names of the jobs to get instances for. See Get-AdtJob for the name format.
| Type | String[] |
|---|---|
| Parameter sets | Name |
| Required | True |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | True |
-Newest
Returns only this many of the most recent instances of each job.
| Type | Int32 |
|---|---|
| Required | False |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
-Server
The server to connect to, if no connection is specified.
| Type | String |
|---|---|
| Required | False |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
-Since
Gets only instances that started at or after this time.
| Type | DateTime |
|---|---|
| Required | False |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
-Status
Gets only instances with these statuses.
| Type | JobState[] |
|---|---|
| Required | False |
| Position | Named |
| Default value | None |
| Accept pipeline input | False |
| Accept wildcard characters | False |
| Accepted values | Unknown, NotRun, Abandoned, Skipped, ConditionNotMet, Resubmitted, Missed, TriggerError, TriggerWarning, Aborted, WaitingForTrigger, Starting, Running, Killing, Queued, AgentQueued, AgentDispatched, Aborting, WaitingForCondition, WaitingForResource, WaitingForPreviousInstance, WaitingForDelay, WaitingForExclusionPeriod, WaitingForRestart, Failed, Killed, TriggerFailed, ConditionFailed, ResourceFailed, ExecutionFailed, Succeeded, CompletedWithErrors, CompletedWithWarnings |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
ArcanaDevelopment.adTempus.Client.Job[]
Jobs from Get-AdtJob.
Outputs
ArcanaDevelopment.adTempus.Client.ExecutionHistoryItem
A job instance (one run of a job).
Notes
This cmdlet uses the connection that fetched the objects piped to it. Otherwise it uses the connection given by -Connection, or a connection to -Server (reused if one is already open for the same server and user), or the default connection. If no connection is open, it connects to the local server using Windows authentication. See Connect-AdtServer.