Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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 Attributes

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 Attributes

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, seeAlias Attribute Declaration.

Argument Validation Attributes

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.

See Also



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.