< Back

Remove-RSJob

Sat Jan 18, 2020 8:25 pm

NAME Remove-RSJob



SYNOPSIS

Deletes a Windows PowerShell runspace job.





SYNTAX

Remove-RSJob [[-Job] <RSJob[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]



Remove-RSJob [[-Name] <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]



Remove-RSJob [[-Id] <Int32[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]



Remove-RSJob [-InstanceID <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]



Remove-RSJob [-Batch <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Deletes a Windows PowerShell background job that has been started using Start-RSJob





PARAMETERS

-Job <RSJob[]>

The job object to remove.



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Name <String[]>

The name of the jobs to remove..



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Id <Int32[]>

The ID of the jobs to remove.



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-InstanceID <String[]>

The GUID of the jobs to remove.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Batch <String[]>

Name of the set of jobs to remove.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Force [<SwitchParameter>]

Force a running job to stop prior to being removed.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

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



NOTES





Name: Remove-RSJob

Author: Boe Prox/Max Kozlov



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



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



Description

-----------

Deletes all jobs with a State of Completed.









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



PS C:\\>Remove-RSJob -ID 1,5,78



Description

-----------

Removes jobs with IDs 1,5,78.











RELATED LINKS