Share via


PowerShell.Runspace Property

Definition

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.

public:
 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

Exceptions

Powershell instance cannot be changed in its current state.

Object is disposed.

Remarks

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

Applies to