Remove-RSJob
SYNOPSIS
Deletes a Windows PowerShell runspace job.
SYNTAX
Job (Default)
Remove-RSJob [[-Job] <RSJob[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
Name
Remove-RSJob [[-Name] <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
Id
Remove-RSJob [[-Id] <Int32[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
InstanceID
Remove-RSJob [-InstanceID <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
Batch
Remove-RSJob [-Batch <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Deletes a Windows PowerShell background job that has been started using Start-RSJob
EXAMPLES
EXAMPLE 1
Get-RSJob -State Completed | Remove-RSJob
Description
Deletes all jobs with a State of Completed.
EXAMPLE 2
Remove-RSJob -ID 1,5,78
Description
Removes jobs with IDs 1,5,78.
PARAMETERS
-Job
The job object to remove.
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 remove..
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 remove.
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 remove.
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 remove.
Type: System.String[]
Parameter Sets: Batch
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Force
Force a running job to stop prior to being removed.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
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: Remove-RSJob Author: Boe Prox/Max Kozlov