Compartilhar via


PowerShellProcessInstance Constructors

Definition

Overloads

PowerShellProcessInstance()

Initializes a new instance of the PowerShellProcessInstance class. Default initializes the underlying dotnet process class.

PowerShellProcessInstance(Version, PSCredential, ScriptBlock, Boolean)

Initializes a new instance of the PowerShellProcessInstance class. Initializes the underlying dotnet process class.

PowerShellProcessInstance(Version, PSCredential, ScriptBlock, Boolean, String)

Initializes a new instance of the PowerShellProcessInstance class. Initializes the underlying dotnet process class.

PowerShellProcessInstance()

Initializes a new instance of the PowerShellProcessInstance class. Default initializes the underlying dotnet process class.

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

Applies to

PowerShellProcessInstance(Version, PSCredential, ScriptBlock, Boolean)

Initializes a new instance of the PowerShellProcessInstance class. Initializes the underlying dotnet process class.

public:
 PowerShellProcessInstance(Version ^ powerShellVersion, System::Management::Automation::PSCredential ^ credential, System::Management::Automation::ScriptBlock ^ initializationScript, bool useWow64);
public PowerShellProcessInstance (Version powerShellVersion, System.Management.Automation.PSCredential credential, System.Management.Automation.ScriptBlock initializationScript, bool useWow64);
new System.Management.Automation.Runspaces.PowerShellProcessInstance : Version * System.Management.Automation.PSCredential * System.Management.Automation.ScriptBlock * bool -> System.Management.Automation.Runspaces.PowerShellProcessInstance
Public Sub New (powerShellVersion As Version, credential As PSCredential, initializationScript As ScriptBlock, useWow64 As Boolean)

Parameters

powerShellVersion
Version

Specifies the version of powershell.

credential
PSCredential

Specifies a user account credentials.

initializationScript
ScriptBlock

Specifies a script that will be executed when the powershell process is initialized.

useWow64
Boolean

Specifies if the powershell process will be 32-bit.

Applies to

PowerShellProcessInstance(Version, PSCredential, ScriptBlock, Boolean, String)

Initializes a new instance of the PowerShellProcessInstance class. Initializes the underlying dotnet process class.

public PowerShellProcessInstance (Version powerShellVersion, System.Management.Automation.PSCredential credential, System.Management.Automation.ScriptBlock initializationScript, bool useWow64, string workingDirectory);
new System.Management.Automation.Runspaces.PowerShellProcessInstance : Version * System.Management.Automation.PSCredential * System.Management.Automation.ScriptBlock * bool * string -> System.Management.Automation.Runspaces.PowerShellProcessInstance
Public Sub New (powerShellVersion As Version, credential As PSCredential, initializationScript As ScriptBlock, useWow64 As Boolean, workingDirectory As String)

Parameters

powerShellVersion
Version

Specifies the version of powershell.

credential
PSCredential

Specifies a user account credentials.

initializationScript
ScriptBlock

Specifies a script that will be executed when the powershell process is initialized.

useWow64
Boolean

Specifies if the powershell process will be 32-bit.

workingDirectory
String

Specifies the initial working directory for the new powershell process.

Applies to