Get-PSSubsystem
Retrieves information about the subsystems registered in PowerShell.
语法
GetAllSet (默认值)
Get-PSSubsystem
[<CommonParameters>]
GetByKindSet
Get-PSSubsystem
-Kind <SubsystemKind>
[<CommonParameters>]
GetByTypeSet
Get-PSSubsystem
-SubsystemType <Type>
[<CommonParameters>]
说明
Retrieves information about the subsystems registered in PowerShell.
Note
This is an experimental feature. This cmdlet is only available when the PSSubsystemPluginModel
feature is enabled. For more information, see
Using Experimental Features.
The feature makes it possible to separate components of System.Management.Automation.dll
into
individual subsystems that reside in their own assembly. This separation reduces the disk footprint
of the core PowerShell engine and allows these components to become optional features for a minimal
PowerShell installation.
Currently, only the CommandPredictor subsystem is supported. This subsystem is used along with
the PSReadLine module to provide custom prediction plugins. In future, Job,
CommandCompleter, Remoting and other components could be separated into subsystem assemblies
outside of System.Management.Automation.dll
.
示例
Example 1 - Display all available subsystems
Get-PSSubsystem
Kind SubsystemType IsRegistered Implementations
---- ------------- ------------ ---------------
CommandPredictor ICommandPredictor False {}
Example 2 - Display all available subsystems of a specific kind
PS> Get-PSSubsystem -Kind CommandPredictor | Format-List
Kind : CommandPredictor
SubsystemType : System.Management.Automation.Subsystem.ICommandPredictor
AllowUnregistration : True
AllowMultipleRegistration : True
RequiredCmdlets : {}
RequiredFunctions : {}
IsRegistered : False
Implementations : {}
参数
-Kind
Specifies the kind of subsystem to be returned. Valid values are: CommandPredictor
.
参数属性
类型: | SubsystemKind |
默认值: | None |
接受的值: | CommandPredictor |
支持通配符: | False |
不显示: | False |
参数集
GetByKindSet
Position: | Named |
必需: | True |
来自管道的值: | True |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-SubsystemType
Specifies the type of subsystem to be returned.
参数属性
类型: | Type |
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
GetByTypeSet
Position: | Named |
必需: | True |
来自管道的值: | True |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.