Get-RSJob
SYNOPSIS
Gets runspace jobs that are currently available in the session.
SYNTAX
All (Default)
Get-RSJob [-State <String[]>] [-HasMoreData] [<CommonParameters>]
Job
Get-RSJob [[-Job] <RSJob[]>] [<CommonParameters>]
Name
Get-RSJob [[-Name] <String[]>] [-State <String[]>] [-HasMoreData] [<CommonParameters>]
Id
Get-RSJob [[-Id] <Int32[]>] [-State <String[]>] [-HasMoreData] [<CommonParameters>]
InstanceID
Get-RSJob [-InstanceID <String[]>] [-State <String[]>] [-HasMoreData] [<CommonParameters>]
Batch
Get-RSJob [-Batch <String[]>] [-State <String[]>] [-HasMoreData] [<CommonParameters>]
DESCRIPTION
Get-RSJob will display all jobs that are currently available to include completed and currently running jobs. If no parameters are given, all jobs are displayed to view.
EXAMPLES
EXAMPLE 1
Get-RSJob -State Completed
Description
Displays a list of jobs which have completed.
EXAMPLE 2
Get-RSJob -ID 1,5,78
Id Name State HasMoreData HasErrors Command -- ---- ----- ----------- --------- ------- 1 Test_1 Completed True False ... 5 Test_5 Completed True False ... 78 Test_78 Completed True False ...
Description
Displays list of jobs with IDs 1,5,78.
PARAMETERS
-Job
Represents the RSJob object being sent to query for.
Type: RSJob[]
Parameter Sets: Job
Aliases: InputObject
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-Name
The name of the jobs to query for.
Type: System.String[]
Parameter Sets: Name
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-Id
The ID of the jobs to query for.
Type: System.Int32[]
Parameter Sets: Id
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-InstanceID
The GUID of the jobs to query for.
Type: System.String[]
Parameter Sets: InstanceID
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Batch
Name of the set of jobs to query for.
Type: System.String[]
Parameter Sets: Batch
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-State
The State of the job that you want to display. Accepted values are:
NotStarted Running Completed Failed Stopping Stopped Disconnected
Type: System.String[]
Parameter Sets: All, Name, Id, InstanceID, Batch
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-HasMoreData
Displays jobs that have data being outputted. You can specify -HasMoreData:$False to display jobs that have no data to output.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: All, Name, Id, InstanceID, Batch
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
RSJob
NOTES
Name: Get-RSJob Author: Boe Prox/Max Kozlov