PowerShell.Create Method

Definition

Overloads

Create(RunspaceMode)

Constructs an empty PowerShell instance; a script or command must be added before invoking this instance

Create(InitialSessionState)

Constructs an empty PowerShell instance; a script or command must be added before invoking this instance

Create()

Constructs an empty PowerShell instance; a script or command must be added before invoking this instance

Create(RunspaceMode)

Constructs an empty PowerShell instance; a script or command must be added before invoking this instance

public static System.Management.Automation.PowerShell Create (System.Management.Automation.RunspaceMode runspace);
Parameters
runspace
RunspaceMode

runspace mode

Returns

An instance of PowerShell.

Create(InitialSessionState)

Constructs an empty PowerShell instance; a script or command must be added before invoking this instance

public static System.Management.Automation.PowerShell Create (System.Management.Automation.Runspaces.InitialSessionState initialSessionState);
Parameters
initialSessionState
InitialSessionState

InitialSessionState with which to create the runspace

Returns

An instance of PowerShell.

Create()

Constructs an empty PowerShell instance; a script or command must be added before invoking this instance

public static System.Management.Automation.PowerShell Create ();
Returns

An instance of PowerShell.