Share via

PowerShell.Runspace Property


Sets an associated Runspace for this PowerShell instance. This can be null in which case a new runspace is created whenever Invoke* method is called.

 property System::Management::Automation::Runspaces::Runspace ^ Runspace { System::Management::Automation::Runspaces::Runspace ^ get(); void set(System::Management::Automation::Runspaces::Runspace ^ value); };
public System.Management.Automation.Runspaces.Runspace Runspace { get; set; }
member this.Runspace : System.Management.Automation.Runspaces.Runspace with get, set
Public Property Runspace As Runspace

Property Value


Powershell instance cannot be changed in its current state.

Object is disposed.


This property and RunspacePool are mutually exclusive; setting one of them resets the other to null

Applies to