Get-Runspace

获取 Windows PowerShell 主机进程中的活动运行空间。

语法

NameParameterSet (默认值)

Get-Runspace
    [[-Name] <String[]>]
    [<CommonParameters>]

IdParameterSet

Get-Runspace
    [-Id] <Int32[]>
    [<CommonParameters>]

InstanceIdParameterSet

Get-Runspace
    [-InstanceId] <Guid[]>
    [<CommonParameters>]

说明

Get-Runspace cmdlet 在 Windows PowerShell 主机进程中获取活动运行空间。

示例

1:


2:


参数

-Id

Get-Runspace cmdlet 在 Windows PowerShell 主机进程中获取活动运行空间。

参数属性

类型:

Int32[]

默认值:None
支持通配符:False
不显示:False

参数集

IdParameterSet
Position:0
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-InstanceId

指定正在运行的作业的实例 ID GUID。

参数属性

类型:

Guid[]

默认值:None
支持通配符:False
不显示:False

参数集

InstanceIdParameterSet
Position:0
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Name

Get-Runspace cmdlet 在 Windows PowerShell 主机进程中获取活动运行空间。

参数属性

类型:

String[]

默认值:None
支持通配符:False
不显示:False

参数集

NameParameterSet
Position:0
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输出

Runspace

可以通过管道将 Get-Runspace 命令的结果传递给 Debug-Runspace