New-ExampleInfo
创建一个 PowerShell 对象,该对象表示 Crescendo 命令对象中使用的示例。
语法
Default (默认值)
New-ExampleInfo
[-command] <String>
[-description] <String>
[[-originalCommand] <String>]
[<CommonParameters>]
说明
创建一个 PowerShell 对象,该对象表示 Crescendo 命令对象中使用的示例。 生成的对象可以转换为要插入到配置文件中的 JSON,或者稍后将其添加到命令对象转换为 JSON。
示例
示例 1
New-ExampleInfo -command Get-Something -originalCommand native.exe -description 'this is some text' |
ConvertTo-Json
{
"Command": "Get-Something",
"OriginalCommand": "native.exe",
"Description": "this is some text"
}
参数
-command
所描述的示例的命令行。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-description
示例的说明。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 1 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-originalCommand
为此 cmdlet 示例运行的原始本机命令。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 2 |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。