PowerShell: List of Aliases
What is Alias
Alias is an alternate name for a command, typically shorter, easier to type.
Many commands in PowerShell by default have many aliases, so if you are familiar with cmd.exe or bash, you can use it right away.
For example,
dir,
ls,
gci,
are all the same as
Get-ChildItem
.
List All Aliases of a Command
Get-Alias -definition fullname-
List all aliases of a cmdlet.
Get-Aliasitself has an alias ofgalget-alias -definition get-childitem
powershell alias
Find Full Name of a Alias
# find the full name of the alias dir get-alias dir
Create New Alias
Set-Alias-
create or set alias.
Set-Alias -Name l -Value Get-ChildItem # short syntax sal l Get-ChildItem
💡 TIP: unlike bash, you cannot create a alias to command with options. Write a Function instead.
Delete a Alias
Example, to remove alias x, do
Remove-Item alias:x
List Aliases
# list all alias Get-Alias *
List of All PowerShell Aliases
Order by Alias
?→Where-Object%→ForEach-Objectac→Add-Contentcat→Get-Contentcd→Set-Locationchdir→Set-Locationclc→Clear-Contentclear→Clear-Hostclhy→Clear-Historycli→Clear-Itemclp→Clear-ItemPropertycls→Clear-Hostclv→Clear-Variablecnsn→Connect-PSSessioncompare→Compare-Objectcopy→Copy-Itemcp→Copy-Itemcpi→Copy-Itemcpp→Copy-ItemPropertycvpa→Convert-Pathdbp→Disable-PSBreakpointdel→Remove-Itemdiff→Compare-Objectdir→Get-ChildItemdnsn→Disconnect-PSSessionebp→Enable-PSBreakpointecho→Write-Outputepal→Export-Aliasepcsv→Export-Csverase→Remove-Itemetsn→Enter-PSSessionexsn→Exit-PSSessionfc→Format-Customfhx→Format-Hexfl→Format-Listforeach→ForEach-Objectft→Format-Tablefw→Format-Widegal→Get-Aliasgbp→Get-PSBreakpointgc→Get-Contentgci→Get-ChildItemgcm→Get-Commandgcs→Get-PSCallStackgdr→Get-PSDrivegerr→Get-Errorghy→Get-Historygi→Get-Itemgjb→Get-Jobgl→Get-Locationgm→Get-Membergmo→Get-Modulegp→Get-ItemPropertygps→Get-Processgpv→Get-ItemPropertyValuegroup→Group-Objectgsn→Get-PSSessiongsv→Get-Servicegu→Get-Uniquegv→Get-Variableh→Get-Historyhistory→Get-Historyicm→Invoke-Commandiex→Invoke-Expressionihy→Invoke-Historyii→Invoke-Itemipal→Import-Aliasipcsv→Import-Csvipmo→Import-Moduleirm→Invoke-RestMethodiwr→Invoke-WebRequestkill→Stop-Processls→Get-ChildItemman→helpmd→mkdirmeasure→Measure-Objectmi→Move-Itemmount→New-PSDrivemove→Move-Itemmp→Move-ItemPropertymv→Move-Itemnal→New-Aliasndr→New-PSDriveni→New-Itemnmo→New-Modulensn→New-PSSessionnv→New-Variableogv→Out-GridViewoh→Out-Hostpopd→Pop-Locationps→Get-Processpushd→Push-Locationpwd→Get-Locationr→Invoke-Historyrbp→Remove-PSBreakpointrcjb→Receive-Jobrcsn→Receive-PSSessionrd→Remove-Itemrdr→Remove-PSDriveren→Rename-Itemri→Remove-Itemrjb→Remove-Jobrm→Remove-Itemrmdir→Remove-Itemrmo→Remove-Modulerni→Rename-Itemrnp→Rename-ItemPropertyrp→Remove-ItemPropertyrsn→Remove-PSSessionrv→Remove-Variablervpa→Resolve-Pathsajb→Start-Jobsal→Set-Aliassaps→Start-Processsasv→Start-Servicesbp→Set-PSBreakpointselect→Select-Objectset→Set-Variableshcm→Show-Commandsi→Set-Itemsl→Set-Locationsleep→Start-Sleepsls→Select-Stringsort→Sort-Objectsp→Set-ItemPropertyspjb→Stop-Jobspps→Stop-Processspsv→Stop-Servicestart→Start-Processsv→Set-Variabletee→Tee-Objecttype→Get-Contentwhere→Where-Objectwjb→Wait-Jobwrite→Write-Output
Order by Full Name
Add-Content→acClear-Content→clcClear-History→clhyClear-Host→clear•clsClear-Item→cliClear-ItemProperty→clpClear-Variable→clvCompare-Object→compare•diffConnect-PSSession→cnsnConvert-Path→cvpaCopy-Item→copy•cp•cpiCopy-ItemProperty→cppDisable-PSBreakpoint→dbpDisconnect-PSSession→dnsnEnable-PSBreakpoint→ebpEnter-PSSession→etsnExit-PSSession→exsnExport-Alias→epalExport-Csv→epcsvForEach-Object→%•foreachFormat-Custom→fcFormat-Hex→fhxFormat-List→flFormat-Table→ftFormat-Wide→fwGet-Alias→galGet-ChildItem→dir•gci•lsGet-Command→gcmGet-Content→cat•gc•typeGet-Error→gerrGet-History→ghy•hGet-History→historyGet-Item→giGet-ItemProperty→gpGet-ItemPropertyValue→gpvGet-Job→gjbGet-Location→gl•pwdGet-Member→gmGet-Module→gmoGet-PSBreakpoint→gbpGet-PSCallStack→gcsGet-PSDrive→gdrGet-PSSession→gsnGet-Process→gps•psGet-Service→gsvGet-Unique→guGet-Variable→gvGroup-Object→groupImport-Alias→ipalImport-Csv→ipcsvImport-Module→ipmoInvoke-Command→icmInvoke-Expression→iexInvoke-History→ihy•rInvoke-Item→iiInvoke-RestMethod→irmInvoke-WebRequest→iwrMeasure-Object→measureMove-Item→mi•move•mvMove-ItemProperty→mpNew-Alias→nalNew-Item→niNew-Module→nmoNew-PSDrive→mount•ndrNew-PSSession→nsnNew-Variable→nvOut-GridView→ogvOut-Host→ohPop-Location→popdPush-Location→pushdReceive-Job→rcjbReceive-PSSession→rcsnRemove-Item→del•erase•rd•ri•rm•rmdirRemove-ItemProperty→rpRemove-Job→rjbRemove-Module→rmoRemove-PSBreakpoint→rbpRemove-PSDrive→rdrRemove-PSSession→rsnRemove-Variable→rvRename-Item→ren•rniRename-ItemProperty→rnpResolve-Path→rvpaSelect-Object→selectSelect-String→slsSet-Alias→salSet-Item→siSet-ItemProperty→spSet-Location→cd•chdir•slSet-PSBreakpoint→sbpSet-Variable→set•svShow-Command→shcmSort-Object→sortStart-Job→sajbStart-Process→saps•startStart-Service→sasvStart-Sleep→sleepStop-Job→spjbStop-Process→kill•sppsStop-Service→spsvTee-Object→teeWait-Job→wjbWhere-Object→?•whereWrite-Output→echo•write
Alias of Functions
help→manmkdir→md