Udostępnij za pośrednictwem


RunspaceInvoke Constructors

Definition

Overloads

RunspaceInvoke()

Create a RunspaceInvoke for invoking commands. This uses a runspace with default PSSnapins.

RunspaceInvoke(Runspace)

Create RunspaceInvoke for invoking command in specified runspace.

RunspaceInvoke(RunspaceConfiguration)

Creates a RunspaceInvoke for invoking commands. Underlying Runspace is created using specified RunspaceConfiguration

RunspaceInvoke(String)

Creates a RunspaceInvoke for invoking commands. Underlying Runspace is created using the specified console file.

RunspaceInvoke()

Create a RunspaceInvoke for invoking commands. This uses a runspace with default PSSnapins.

public:
 RunspaceInvoke();
public:
 RunspaceInvoke();
 RunspaceInvoke();
public RunspaceInvoke ();
Public Sub New ()

Applies to

RunspaceInvoke(Runspace)

Create RunspaceInvoke for invoking command in specified runspace.

public:
 RunspaceInvoke(System::Management::Automation::Runspaces::Runspace ^ runspace);
public RunspaceInvoke (System.Management.Automation.Runspaces.Runspace runspace);
new System.Management.Automation.RunspaceInvoke : System.Management.Automation.Runspaces.Runspace -> System.Management.Automation.RunspaceInvoke
Public Sub New (runspace As Runspace)

Parameters

runspace
Runspace

Remarks

Runspace must be opened state

Applies to

RunspaceInvoke(RunspaceConfiguration)

Creates a RunspaceInvoke for invoking commands. Underlying Runspace is created using specified RunspaceConfiguration

public:
 RunspaceInvoke(System::Management::Automation::Runspaces::RunspaceConfiguration ^ runspaceConfiguration);
public RunspaceInvoke (System.Management.Automation.Runspaces.RunspaceConfiguration runspaceConfiguration);
new System.Management.Automation.RunspaceInvoke : System.Management.Automation.Runspaces.RunspaceConfiguration -> System.Management.Automation.RunspaceInvoke
Public Sub New (runspaceConfiguration As RunspaceConfiguration)

Parameters

runspaceConfiguration
RunspaceConfiguration

RunspaceConfiguration used for creating the runspace

Exceptions

Thrown when runspaceConfiguration is null

Applies to

RunspaceInvoke(String)

Creates a RunspaceInvoke for invoking commands. Underlying Runspace is created using the specified console file.

public:
 RunspaceInvoke(System::String ^ consoleFilePath);
public:
 RunspaceInvoke(Platform::String ^ consoleFilePath);
 RunspaceInvoke(std::wstring const & consoleFilePath);
public RunspaceInvoke (string consoleFilePath);
new System.Management.Automation.RunspaceInvoke : string -> System.Management.Automation.RunspaceInvoke
Public Sub New (consoleFilePath As String)

Parameters

consoleFilePath
String

Console file used for creating the underlying runspace.

Exceptions

Thrown when consoleFilePath is null

Thrown when errors occurs in loading one or more PSSnapins.

Applies to