CmdID

CmdID / PowerShell / Cmdlets / Get

Get-Runspace

Gets active runspaces within a PowerShell host process. PowerShell reference

From the PowerShell reference 3 parameters

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

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-RunspaceIdentify

Get runspace by Id

Get-Runspace -Id 2Identify

Get runspace by Name

Get-Runspace -Name Runspace1Identify

Get runspace by InstanceId

$activeRunspace = Get-Runspace -Name Runspace1 Get-Runspace -InstanceId $activeRunspace.InstanceIdIdentify

Its page in the reference: Get-Runspace.

Parameters

3 in the PowerShell reference
-IdSpecifies the Id of a runspace
-InstanceIdSpecifies the instance ID GUID of a running job.
-NameSpecifies the Name of a runspace