Get-Alias: Getting the Real Name of PowerShell Command

Nothing so special on command Get-Alias, but you may get to know the real name of the PowerShell command associated with an alias. We found it very useful, at least for those who just started to learn on PowerShell as peoples are being living with Linux command for a long time.

Below are some examples on getting the aliases. The first is to list all the available aliases in the PowerShell. The 2nd and 3rd example, to list on the specific alias.

PS C:\> get-alias | more

CommandType     Name                            ModuleName
-----------     ----                            ----------
Alias           cat -> Get-Content
Alias           cd -> Set-Location
Alias           chdir -> Set-Location
Alias           clc -> Clear-Content
Alias           clear -> Clear-Host
Alias           clhy -> Clear-History
Alias           cli -> Clear-Item
Alias           clp -> Clear-ItemProperty
Alias           cls -> Clear-Host
Alias           clv -> Clear-Variable
Alias           cnsn -> Connect-PSSession
Alias           compare -> Compare-Object
Alias           copy -> Copy-Item
Alias           cp -> Copy-Item
Alias           cpi -> Copy-Item
Alias           cpp -> Copy-ItemProperty
Alias           curl -> Invoke-WebRequest
Alias           cvpa -> Convert-Path
Alias           dbp -> Disable-PSBreakpoint
Alias           del -> Remove-Item
Alias           diff -> Compare-Object
Alias           dir -> Get-ChildItem
Alias           dnsn -> Disconnect-PSSession
Alias           ebp -> Enable-PSBreakpoint
Alias           echo -> Write-Output
Alias           epal -> Export-Alias
Alias           epcsv -> Export-Csv
Alias           epsn -> Export-PSSession
Alias           erase -> Remove-Item
PS C:\> get-alias copy

CommandType     Name                            ModuleName
-----------     ----                            ----------
Alias           copy -> Copy-Item
PS C:\> get-alias md

CommandType     Name                            ModuleName
-----------     ----                            ----------
Alias           md -> mkdir

You May Also Like

Leave a Reply?