Share via


PSJob.SetJobState Method

Sets the status of the PSJob, such as running, completed, or failed.

Namespace: System.Management.Automation
Assembly: System.Management.Automation (in system.management.automation.dll)

Usage

Syntax

'Declaration
Protected Sub SetJobState ( _
    state As PSJobState _
)
protected void SetJobState (
    PSJobState state
)
protected:
void SetJobState (
    PSJobState state
)
protected void SetJobState (
    PSJobState state
)
protected function SetJobState (
    state : PSJobState
)

Parameters

  • state
    A PSJobState constant that identifies the status of the PSJob, such as running, completed, or failed.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP

Target Platforms

Windows Server 2008, Windows Server 2003, Windows Vista, Windows XP

See Also

Reference

PSJob Class
PSJob Members
System.Management.Automation Namespace