CmdID / PowerShell / Cmdlets / Get
Get-Runspace
Gets active runspaces within a PowerShell host process. PowerShell reference
From the PowerShell reference 3 parameters
What it does
Gets active runspaces within a PowerShell host process. The Get-Runspace cmdlet gets active runspaces in a PowerShell host process.
Get-Runspace [[-Name] <String[]>] [<CommonParameters>]Get-Runspace [-Id] <Int32[]> [<CommonParameters>]Get-Runspace [-InstanceId] <Guid[]> [<CommonParameters>]
Get runspaces
Get-RunspaceIdentifyGet runspace by Id
Get-Runspace -Id 2IdentifyGet runspace by Name
Get-Runspace -Name Runspace1IdentifyGet runspace by InstanceId
$activeRunspace = Get-Runspace -Name Runspace1
Get-Runspace -InstanceId $activeRunspace.InstanceIdIdentifyIts page in the reference: Get-Runspace.
Parameters
-IdSpecifies the Id of a runspace-InstanceIdSpecifies the instance ID GUID of a running job.-NameSpecifies the Name of a runspace