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

Alias Attribute Declaration

The Alias attribute allows the user to specify different names for a cmdlet parameter. Aliases can be used to provide shortcuts for a parameter name, or they can provide different names that are appropriate for different scenarios.

[Alias(aliasNames)]

Parameters

aliasName (String[])
Required. Specifies a set of comma-separated alias names for the cmdlet parameter.

  • The Alias attribute is used with the Parameter attribute when you specify a cmdlet parameter. For more information about how to declare these attributes, see How to Declare Cmdlet Parameters.

  • Each alias name must be unique within a cmdlet. Windows PowerShell does not check for duplicate alias names.

  • The Alias attribute is used once for each parameter in a cmdlet.

  • The Alias attribute is defined by the AliasAttribute class.



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.