Alias for PowerShell cmdlet.


Aliases are defined for the cmdlets by default.
You can check them in the ALIASES column of the Get-Help cmdlet or the Get-Alias cmdlet.

# PSVersion 5.1
# All the following are the same result
PS> Get-ChildItem
PS> gci
PS> ls
PS> dir

In the cross-platform version of PowerShell, ls will have a name conflict.
There is no ls as an alias for Get-ChildItem.

# PSVersion 7.0.2
PS /Users/miajimyu> Get-Alias -Definition Get-ChildItem

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           dir -> Get-ChildItem                                          
Alias           gci -> Get-ChildItem

Configuring aliases

You can also configure aliases by yourself.

PS> Set-Alias testtest "C:\Users\user\Desktop\script.ps1"
PS> testtest


Click here for a video explanation.

Last modified October 11, 2022: update (8216439)