< Back

Get-RSJob

Sat Jan 18, 2020 8:25 pm

NAME Get-RSJob



SYNOPSIS

Gets runspace jobs that are currently available in the session.





SYNTAX

Get-RSJob [-State <String[]>] [-HasMoreData] [<CommonParameters>]



Get-RSJob [[-Job] <RSJob[]>] [<CommonParameters>]



Get-RSJob [[-Name] <String[]>] [-State <String[]>] [-HasMoreData] [<CommonParameters>]



Get-RSJob [[-Id] <Int32[]>] [-State <String[]>] [-HasMoreData] [<CommonParameters>]



Get-RSJob [-InstanceID <String[]>] [-State <String[]>] [-HasMoreData] [<CommonParameters>]



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.





PARAMETERS

-Job <RSJob[]>

Represents the RSJob object being sent to query for.



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Name <String[]>

The name of the jobs to query for.



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Id <Int32[]>

The ID of the jobs to query for.



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-InstanceID <String[]>

The GUID of the jobs to query for.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Batch <String[]>

Name of the set of jobs to query for.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-State <String[]>

The State of the job that you want to display. Accepted values are:



NotStarted

Running

Completed

Failed

Stopping

Stopped

Disconnected



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-HasMoreData [<SwitchParameter>]

Displays jobs that have data being outputted. You can specify -HasMoreData:$False to display jobs

that have no data to output.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

RSJob





NOTES





Name: Get-RSJob

Author: Boe Prox/Max Kozlov



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



PS C:\\>Get-RSJob -State Completed



Description

-----------

Displays a list of jobs which have completed.









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



PS C:\\>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.











RELATED LINKS