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 System.Management.Automation.Runspaces.Runspace Runspace { get; set; }
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