Wait-RSJob
SYNOPSIS
Waits until all RSJobs are in one of the following states:
SYNTAX
All (Default)
Wait-RSJob [-State <String[]>] [-Timeout <Int32>] [-ShowProgress] [<CommonParameters>]
Job
Wait-RSJob [[-Job] <RSJob[]>] [-Timeout <Int32>] [-ShowProgress] [<CommonParameters>]
Name
Wait-RSJob [[-Name] <String[]>] [-State <String[]>] [-Timeout <Int32>] [-ShowProgress] [<CommonParameters>]
Id
Wait-RSJob [[-Id] <Int32[]>] [-State <String[]>] [-Timeout <Int32>] [-ShowProgress] [<CommonParameters>]
InstanceID
Wait-RSJob [-InstanceID <String[]>] [-State <String[]>] [-Timeout <Int32>] [-ShowProgress] [<CommonParameters>]
Batch
Wait-RSJob [-Batch <String[]>] [-State <String[]>] [-Timeout <Int32>] [-ShowProgress] [<CommonParameters>]
DESCRIPTION
Waits until all RSJobs are in one of the following states:
EXAMPLES
EXAMPLE 1
Get-RSJob | Wait-RSJob
Description
-----------
Waits for jobs which have to be completed.
PARAMETERS
-Job
The job object to wait 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 wait 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 that you want to wait 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 that you want to wait 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 that you want to wait 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 wait for. 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
-Timeout
Timeout after specified number of seconds. This is a global timeout meaning that it is not a per job timeout.
Type: System.Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-ShowProgress
Displays a progress bar
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
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
NOTES
Name: Wait-RSJob Author: Ryan Bushe/Boe Prox/Max Kozlov