Get-Command参数-commandCapability做什么?

时间:2012-06-06 08:56:31

标签: powershell-v3.0

当我在参数结尾处看到-CommandCapability时,我正在研究PowerShell 3中的Get-Command。

我的问题是你如何让这个-CommandCapability参数起作用?

2 个答案:

答案 0 :(得分:1)

Get-Command |选择能力应该给你一些线索。 也是Get-Command |集团能力,以了解可能的选择。

基本上,它可以区分“普通”cmdlet,脚本,CIM cmdlet和工作流。我想说它是对当前存在的CommandType分类的扩展。

答案 1 :(得分:0)

@Guy - 我在最新的PowerShell V3中没有看到-CommandCapability:

Parameter Set: CmdletSet
Get-Command [[-ArgumentList] <Object[]> ] [-All] [-ListImported] [-Module <String[]> ] [-Noun <String[]> ] [-ParameterName <String[]> ] [-ParameterType <PSTypeName[]> ] [-Syntax] [-TotalCount <Int32> ] [-Verb <String[]> ] [ <CommonParameters>]

Parameter Set: AllCommandSet
Get-Command [[-Name] <String[]> ] [[-ArgumentList] <Object[]> ] [-All] [-CommandType <CommandTypes> ] [-ListImported] [-Module <String[]> ] [-ParameterName <String[]> ] [-ParameterType <PSTypeName[]> ] [-Syntax] [-TotalCount <Int32> ] [ <CommonParameters>]

您的意思是CommandType吗?