PowerShell.Runspace Property
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Gets and sets the runspace used when the pipeline is invoked. The runspace is the operating environment that defines which commands, variables, and other elements are available. This property is introduced in Windows PowerShell 2.0.
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
/** @property */ public Runspace get_Runspace () /** @property */ public void set_Runspace (Runspace value)
public function get Runspace () : Runspace public function set Runspace (value : Runspace)
Property Value
Returns a Runspace object that defines the runspace used when the pipeline is invoked. This property can be set to null, in which case a new runspace is created whenever the pipeline is invoked.| Exception type | Condition |
|---|---|
| InvalidPowerShellStateException |
The PowerShell object cannot be changed in its current state. |
| ObjectDisposedException |
The PowerShell object is disposed. |
This property and the RunspacePool property are mutually exclusive; setting one of them resets the other to null.
To invoke the pipeline synchronously, call the Invoke method. To invoke the pipeline asynchronously, call the BeginInvoke method.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Target Platforms
Windows Developer Preview, Windows Server Developer PreviewSend comments about this topic to Microsoft.