Professional Documents
Culture Documents
about_aliases
SHORT DESCRIPTION
Describes how to use alternate names for cmdlets and commands in Windows
PowerShell.
LONG DESCRIPTION
An alias is an alternate name or nickname for a cmdlet or for a command
element, such as a function, script, file, or executable file. You
can use the alias instead of the command name in any Windows PowerShell
commands.
To create an alias, use the New-Alias cmdlet. For example, the following
command creates the "gas" alias for the Get-AuthenticodeSignature cmdlet:
new-alias -name gas -value Get-AuthenticodeSignature
After you create the alias for the cmdlet name, you can use the alias
instead of the cmdlet name. For example, to get the Authenticode signature
for the SqlScript.ps1 file, type:
get-authenticodesignature sqlscript.ps1
Or, type:
gas sqlscript.ps1
If you create "word" as the alias for Microsoft Office Word, you can type
"word" instead of the following:
"c:\program files\microsoft office\office11\winword.exe"
BUILT-IN ALIASES
Windows PowerShell includes a set of built-in aliases, including "cd" and
"chdir" for the Set-Location cmdlet, and "ls" and "dir" for the
Get-ChildItem cmdlet.
To get all the aliases on the computer, including the built-in aliases,
type:
get-alias
ALIAS CMDLETS
Windows PowerShell includes the following cmdlets, which are designed for
working with aliases:
-
get-help alias-psprovider
SEE ALSO
new-alias
get-alias
set-alias
export-alias
import-alias
get-psprovider
get-psdrive
about_functions
about_profiles
about_providers