Alias Attribute Declaration
The Alias attribute allows the user to specify different names for a cmdlet or 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.
Syntax
[Alias(aliasNames)]
Parameters
aliasNames
(String[])
Required. Specifies a set of comma-separated alias names for the cmdlet parameter.
Remarks
The Alias attribute is defined by the System.Management.Automation.Aliasattribute class.
Cmdlet aliases
- The Alias attribute is used with the cmdlet declaration. For more information about how to declare these attributes, see Cmdlet Aliases.
- Each parameter alias name must be unique. Windows PowerShell does not check for duplicate alias names.
Parameter aliases
- 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 parameter 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.
See Also
Współpracuj z nami w serwisie GitHub
Źródło tej zawartości można znaleźć w witrynie GitHub, gdzie można również tworzyć i przeglądać problemy i żądania ściągnięcia. Więcej informacji znajdziesz w naszym przewodniku dla współtwórców.
Opinia
https://aka.ms/ContentUserFeedback.
Dostępne już wkrótce: W 2024 r. będziemy stopniowo wycofywać zgłoszenia z serwisu GitHub jako mechanizm przesyłania opinii na temat zawartości i zastępować go nowym systemem opinii. Aby uzyskać więcej informacji, sprawdź:Prześlij i wyświetl opinię dla