Compartir a través de


ParameterAttribute Class

Definition

Identifies parameters to Cmdlets.

public ref class ParameterAttribute sealed : System::Management::Automation::Internal::ParsingBaseAttribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=true)]
public sealed class ParameterAttribute : System.Management.Automation.Internal.ParsingBaseAttribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=true)>]
type ParameterAttribute = class
    inherit ParsingBaseAttribute
Public NotInheritable Class ParameterAttribute
Inherits ParsingBaseAttribute
Inheritance
Attributes

Constructors

ParameterAttribute()

Initializes a new instance of the ParameterAttribute class.

ParameterAttribute(String, ExperimentAction)

Initializes a new instance that is associated with an experimental feature.

Fields

AllParameterSets

ParameterSetName referring to all ParameterSets.

Properties

DontShow

Indicates that this parameter should not be shown to the user in this like intellisense This is primarily to be used in functions that are implementing the logic for dynamic keywords.

ExperimentAction

Gets the action for the engine to take when the experimental feature is enabled.

ExperimentName

Gets the name of the experimental feature this attribute is associated with.

HelpMessage

Gets or sets a short description for this parameter, suitable for presentation as a tool tip.

HelpMessageBaseName

Gets or sets the base name of the resource for a help message. When this field is specified, HelpMessageResourceId must also be specified.

HelpMessageResourceId

Gets or sets the Id of the resource for a help message. When this field is specified, HelpMessageBaseName must also be specified.

Mandatory

Gets or sets a flag specifying if this parameter is Mandatory. When it is not specified, false is assumed and the parameter is considered optional.

ParameterSetName

Gets or sets the name of the parameter set this parameter belongs to. When it is not specified, AllParameterSets is assumed.

Position

Gets or sets the parameter position. If not set, the parameter is named.

ValueFromPipeline

Gets or sets a flag that specifies that this parameter can take values from the incoming pipeline object. When it is not specified, false is assumed.

ValueFromPipelineByPropertyName

Gets or sets a flag that specifies that this parameter can take values from a property in the incoming pipeline object with the same name as the parameter or an alias of the parameter. When it is not specified, false is assumed.

ValueFromRemainingArguments

Gets or sets a flag that specifies that the remaining command line parameters should be associated with this parameter in the form of an array. When it is not specified, false is assumed.

Applies to