RunspaceFactory.CreateRunspace Method (RunspaceConfiguration)
Assembly: System.Management.Automation (in System.Management.Automation.dll)
public static function CreateRunspace ( runspaceConfiguration : RunspaceConfiguration ) : Runspace
A RunspaceConfiguration object that represents the runspace configuration.
Return ValueReturns a Runspace object that represents the runspace. When the runspace is opened the specified runspace configuration is used.
A runspace is the operating environment used when invoking the commands of a pipeline. After the runspace is created, it must be opened by using one of the following methods before it can be used:
To open the runspace synchronously, call the Open method.
To open the runspace asynchronously, call the OpenAsync method.
Runspaces created with this method use the default host provided by Windows PowerShell. When using the default host there is no way to interact or communicate directly with the user through prompting.