Attribute Types

 

Cmdlet attributes can be grouped by functionality. The following sections describe the available attributes and describe what the runtime does when the attribute is invoked.

Cmdlet

Identifies a .NET Framework class as a cmdlet. This is the required base attribute.For more information about the syntax and parameters of this attribute, seeCmdlet Attribute Declaration.

Parameter

Identifies a public property in the cmdlet class as a cmdlet parameter. For more information about the syntax and parameters of this attribute, seeParameter Attribute Declaration.

Alias

Specifies one or more aliases for a parameter. For more information about aliases, see Cmdlet Aliases.For more information about the syntax and parameters of this attribute, seeAliasAttribute Declaration.

ValidateCount

Specifies the minimum and maximum number of arguments that are allowed for a cmdlet parameter. For more information about the syntax and parameters of this attribute, seeValidateCount Attribute Declaration.

ValidateLength

Specifies a minimum and maximum number of characters for a cmdlet parameter argument. For more information about the syntax and parameters of this attribute, seeValidateLength Attribute Declaration.

ValidatePattern

Specifies a regular expression pattern that the cmdlet parameter argument must match. For more information about the syntax and parameters of this attribute, seeValidatePattern Attribute Declaration.

ValidateRange

Specifies the minimum and maximum values for a cmdlet parameter argument. For more information about the syntax and parameters of this attribute, seeValidateRange Attribute Declaration.

ValidateSet

Specifies a set of valid values for the cmdlet parameter argument. For more information about the syntax and parameters of this attribute, seeValidateSet Attribute Declaration.

Show: