February 2019
Intermediate to advanced
626 pages
15h 51m
English
An alias in PowerShell is an alternate name for a command. A command may have more than one alias.
The list of aliases may be viewed by using Get-Alias, as shown in the following example:
PS> Get-AliasCommandType Name ----------- ---- Alias % -> ForEach-Object Alias ? -> Where-Object Alias ac -> Add-Content Alias asnp -> Add-PSSnapin Alias cat -> Get-Content Alias cd -> Set-Location
Get-Alias may be used to find the command behind an alias:
Get-Alias dir
It can also be used to find the aliases for a command name:
Get-Alias -Definition Get-ChildItem
Examples of aliases that are frequently used in examples on the internet include the following:
Read now
Unlock full access