New-ParameterInfo

Creates a PowerShell object representing a Crescendo Parameter definition.

语法

Default (默认值)

New-ParameterInfo
    [-Name] <String>
    [-OriginalName] <String>
    [<CommonParameters>]

说明

Creates a PowerShell object representing a Crescendo Parameter definition. You can assign values to the properties of the object. The resulting object can be added to the Parameters property of a command object or it can be converted to JSON to be inserted in the configuration file.

示例

Example 1 - Create a new parameter object

$param = New-ParameterInfo -Name ComputerName -OriginalName '--targethost'
$param
Name                            : ComputerName
OriginalName                    : --targethost
OriginalText                    :
Description                     :
DefaultValue                    :
DefaultMissingValue             :
ApplyToExecutable               : False
ParameterType                   : object
AdditionalParameterAttributes   :
Mandatory                       : False
ParameterSetName                :
Aliases                         :
Position                        : 2147483647
OriginalPosition                : 0
ValueFromPipeline               : False
ValueFromPipelineByPropertyName : False
ValueFromRemainingArguments     : False
NoGap                           : False

参数

-Name

The name of the parameter for the cmdlet being defined.

参数属性

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

参数集

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

-OriginalName

The original parameter used by the native executable.

参数属性

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

参数集

(All)
Position:1
必需:True
来自管道的值:False
来自管道的值(按属性名称):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.

输入

None

输出

Object