Share via


PSJob Constructor (String, String)

Initializes a new instance of the PSJob class, and defines the pipeline and name of the PSJob.

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

Usage

Syntax

'Declaration
Protected Sub New ( _
    command As String, _
    name As String _
)
protected PSJob (
    string command,
    string name
)
protected:
PSJob (
    String^ command, 
    String^ name
)
protected PSJob (
    String command, 
    String name
)
protected function PSJob (
    command : String, 
    name : String
)

Parameters

  • command
    The pipeline that is executed by the PSJob.
  • name
    The name used to identify the PSJob. The job name is used to start running the job, to get information about the job, and more.

Remarks

The pipeline that the PSJob executes can contain cmdlets, functions, scripts, script cmdlets, or any other command-based tasks.

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