ParameterAttribute ParameterAttribute ParameterAttribute Class

Definition

Identifies parameters to Cmdlets

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

Constructors

ParameterAttribute() ParameterAttribute() ParameterAttribute()

Initializes a new instance of the ParameterAttribute class

Fields

AllParameterSets AllParameterSets AllParameterSets

ParameterSetName referring to all ParameterSets

Properties

DontShow DontShow 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.

HelpMessage HelpMessage HelpMessage

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

HelpMessageBaseName HelpMessageBaseName HelpMessageBaseName

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

HelpMessageResourceId HelpMessageResourceId HelpMessageResourceId

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

Mandatory Mandatory Mandatory

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

ParameterSetName ParameterSetName ParameterSetName

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

Position Position Position

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

ValueFromPipeline ValueFromPipeline ValueFromPipeline

Gets and 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 ValueFromPipelineByPropertyName ValueFromPipelineByPropertyName

Gets and 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. When it is not specified, false is assumed.

ValueFromRemainingArguments ValueFromRemainingArguments ValueFromRemainingArguments

Gets and 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