PowerShellAliases

Remarks

Powershell naming system has quite strict rules of naming cmdlets (Verb-Noun template; see [topic not yet created] for more information). But it is not really convenient to write Get-ChildItems every time you want to list files in directory interactively.
Therefore Powershell enables using shortcuts - aliases - instead of cmdlet names.

You can write ls, dir or gci instead of Get-ChildItem and get the same result. Alias is equivalent to its cmdlet.

Some of the common aliases are:

aliascmdlet
%, foreachFor-EachObject
?, whereWhere-Object
cat, gc, typeGet-Content
cd, chdir, slSet-Location
cls, clearClear-Host
cp, copy, cpiCopy-Item
dir/ls/gciGet-ChildItem
echo, writeWrite-Output
flFormat-List
ftFormat-Table
fwFormat-Wide
gc, pwdGet-Location
gmGet-Member
iexInvoke-Expression
iiInvoke-Item
mv, moveMove-Item
rm, rmdir, del, erase, rd, riRemove-Item
sleepStart-Sleep
start, sapsStart-Process

In the table above, you can see how aliases enabled simulating commands known from other environments (cmd, bash), hence increased discoverability.

Get-Alias

To list all aliases and their functions:

Get-Alias

To get all aliases for specific cmdlet:

PS C:\> get-alias -Definition Get-ChildItem

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

To find aliases by matching:

PS C:\> get-alias -Name p*

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           popd -> Pop-Location
Alias           proc -> Get-Process
Alias           ps -> Get-Process
Alias           pushd -> Push-Location
Alias           pwd -> Get-Location

Set-Alias

This cmdlet allows you to create new alternate names for exiting cmdlets

PS C:\> Set-Alias -Name proc -Value Get-Process
PS C:\> proc

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id  SI ProcessName
-------  ------    -----      ----- -----   ------     --  -- -----------
    292      17    13052      20444 ...19     7.94    620   1 ApplicationFrameHost
....

Keep in mind that any alias you create will be persisted only in current session. When you start new session you need to create your aliases again. Powershell Profiles (see [topic not yet created]) are great for these purposes.