RemoveJobCommand RemoveJobCommand RemoveJobCommand Class

Definition

This cmdlet removes the Job object from the runspace wide Job repository.

Once the Job object is removed, it will not be available through get-psjob command.

[System.Management.Automation.Cmdlet("Remove", "Job", DefaultParameterSetName="SessionIdParameterSet", HelpUri="https://go.microsoft.com/fwlink/?LinkID=113377", SupportsShouldProcess=true)]
[System.Management.Automation.OutputType(typeof(System.Management.Automation.Job), ParameterSetName=Mono.Cecil.CustomAttributeArgument[])]
public class RemoveJobCommand : Microsoft.PowerShell.Commands.JobCmdletBase, IDisposable
type RemoveJobCommand = class
    inherit JobCmdletBase
    interface IDisposable
Public Class RemoveJobCommand
Inherits JobCmdletBase
Implements IDisposable
Inheritance
Attributes
Implements

Constructors

RemoveJobCommand() RemoveJobCommand() RemoveJobCommand()

Properties

Command Command Command Inherited from JobCmdletBase
CommandOrigin CommandOrigin CommandOrigin Inherited from InternalCommand
CommandRuntime CommandRuntime CommandRuntime Inherited from Cmdlet
CurrentPSTransaction CurrentPSTransaction CurrentPSTransaction Inherited from Cmdlet
Events Events Events Inherited from PSCmdlet
Filter Filter Filter Inherited from JobCmdletBase
Force Force Force

If state of the job is running or notstarted, this will forcefully stop it.

Host Host Host Inherited from PSCmdlet
Id Id Id Inherited from JobCmdletBase
InstanceId InstanceId InstanceId Inherited from JobCmdletBase
InvokeCommand InvokeCommand InvokeCommand Inherited from PSCmdlet
InvokeProvider InvokeProvider InvokeProvider Inherited from PSCmdlet
Job Job Job

Specifies the Jobs objects which need to be removed

JobManager JobManager JobManager Inherited from PSCmdlet
JobRepository JobRepository JobRepository Inherited from PSCmdlet
MyInvocation MyInvocation MyInvocation Inherited from PSCmdlet
Name Name Name Inherited from JobCmdletBase
PagingParameters PagingParameters PagingParameters Inherited from PSCmdlet
ParameterSetName ParameterSetName ParameterSetName Inherited from PSCmdlet
SessionState SessionState SessionState Inherited from PSCmdlet
State State State Inherited from JobCmdletBase
Stopping Stopping Stopping Inherited from Cmdlet

Methods

BeginProcessing() BeginProcessing() BeginProcessing() Inherited from JobCmdletBase
CurrentProviderLocation(String) CurrentProviderLocation(String) CurrentProviderLocation(String) Inherited from PSCmdlet
Dispose() Dispose() Dispose()
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)
EndProcessing() EndProcessing() EndProcessing()

Wait for all the stop jobs to be completed

GetResolvedProviderPathFromPSPath(String, ProviderInfo) GetResolvedProviderPathFromPSPath(String, ProviderInfo) GetResolvedProviderPathFromPSPath(String, ProviderInfo) Inherited from PSCmdlet
GetResourceString(String, String) GetResourceString(String, String) GetResourceString(String, String) Inherited from Cmdlet
GetUnresolvedProviderPathFromPSPath(String) GetUnresolvedProviderPathFromPSPath(String) GetUnresolvedProviderPathFromPSPath(String) Inherited from PSCmdlet
GetVariableValue(String) GetVariableValue(String) GetVariableValue(String) Inherited from PSCmdlet
GetVariableValue(String, Object) GetVariableValue(String, Object) GetVariableValue(String, Object) Inherited from PSCmdlet
Invoke() Invoke() Invoke() Inherited from Cmdlet
Invoke<T>() Invoke<T>() Invoke<T>() Inherited from Cmdlet
ProcessRecord() ProcessRecord() ProcessRecord()

Gets the job object as per the parameter and removes it.

ResolveAppName(String) ResolveAppName(String) ResolveAppName(String) Inherited from PSRemotingCmdlet
ResolveComputerName(String) ResolveComputerName(String) ResolveComputerName(String) Inherited from PSRemotingCmdlet
ResolveComputerNames(String[], String[]) ResolveComputerNames(String[], String[]) ResolveComputerNames(String[], String[]) Inherited from PSRemotingCmdlet
ResolveShell(String) ResolveShell(String) ResolveShell(String) Inherited from PSRemotingCmdlet
ShouldContinue(String, String) ShouldContinue(String, String) ShouldContinue(String, String) Inherited from Cmdlet
ShouldContinue(String, String, Boolean, Boolean) ShouldContinue(String, String, Boolean, Boolean) ShouldContinue(String, String, Boolean, Boolean) Inherited from Cmdlet
ShouldContinue(String, String, Boolean, Boolean, Boolean) ShouldContinue(String, String, Boolean, Boolean, Boolean) ShouldContinue(String, String, Boolean, Boolean, Boolean) Inherited from Cmdlet
ShouldProcess(String) ShouldProcess(String) ShouldProcess(String) Inherited from Cmdlet
ShouldProcess(String, String) ShouldProcess(String, String) ShouldProcess(String, String) Inherited from Cmdlet
ShouldProcess(String, String, String) ShouldProcess(String, String, String) ShouldProcess(String, String, String) Inherited from Cmdlet
ShouldProcess(String, String, String, ShouldProcessReason) ShouldProcess(String, String, String, ShouldProcessReason) ShouldProcess(String, String, String, ShouldProcessReason) Inherited from Cmdlet
StopProcessing() StopProcessing() StopProcessing()

release waiting for jobs

ThrowTerminatingError(ErrorRecord) ThrowTerminatingError(ErrorRecord) ThrowTerminatingError(ErrorRecord) Inherited from Cmdlet
TransactionAvailable() TransactionAvailable() TransactionAvailable() Inherited from Cmdlet
WriteCommandDetail(String) WriteCommandDetail(String) WriteCommandDetail(String) Inherited from Cmdlet
WriteDebug(String) WriteDebug(String) WriteDebug(String) Inherited from Cmdlet
WriteError(ErrorRecord) WriteError(ErrorRecord) WriteError(ErrorRecord) Inherited from Cmdlet
WriteInformation(InformationRecord) WriteInformation(InformationRecord) WriteInformation(InformationRecord) Inherited from Cmdlet
WriteInformation(Object, String[]) WriteInformation(Object, String[]) WriteInformation(Object, String[]) Inherited from Cmdlet
WriteObject(Object) WriteObject(Object) WriteObject(Object) Inherited from Cmdlet
WriteObject(Object, Boolean) WriteObject(Object, Boolean) WriteObject(Object, Boolean) Inherited from Cmdlet
WriteProgress(ProgressRecord) WriteProgress(ProgressRecord) WriteProgress(ProgressRecord) Inherited from Cmdlet
WriteVerbose(String) WriteVerbose(String) WriteVerbose(String) Inherited from Cmdlet
WriteWarning(String) WriteWarning(String) WriteWarning(String) Inherited from Cmdlet

Fields

ComputerInstanceIdParameterSet ComputerInstanceIdParameterSet ComputerInstanceIdParameterSet Inherited from PSRemotingCmdlet
ComputerNameParameterSet ComputerNameParameterSet ComputerNameParameterSet Inherited from PSRemotingCmdlet
ContainerIdParameterSet ContainerIdParameterSet ContainerIdParameterSet Inherited from PSRemotingCmdlet
DefaultPowerShellRemoteShellAppName DefaultPowerShellRemoteShellAppName DefaultPowerShellRemoteShellAppName Inherited from PSRemotingCmdlet
DefaultPowerShellRemoteShellName DefaultPowerShellRemoteShellName DefaultPowerShellRemoteShellName Inherited from PSRemotingCmdlet
SSHHostHashParameterSet SSHHostHashParameterSet SSHHostHashParameterSet Inherited from PSRemotingCmdlet
SSHHostParameterSet SSHHostParameterSet SSHHostParameterSet Inherited from PSRemotingCmdlet
SessionParameterSet SessionParameterSet SessionParameterSet Inherited from PSRemotingCmdlet
VMIdParameterSet VMIdParameterSet VMIdParameterSet Inherited from PSRemotingCmdlet
VMNameParameterSet VMNameParameterSet VMNameParameterSet Inherited from PSRemotingCmdlet

Applies to