PowerShell: List Alias, Find Alias
PowerShell command can have aliase. For example,
are all the same as
List All Aliases
# show all aliases Get-Alias
# show aliases ending in r Get-Alias *r
Get-Alias has alias
# find fullname of alias “dir” Get-Alias dir # or help dir
List a Cmdlet's Aliases
# list aliases of Get-Childitem Get-Alias -definition get-childitem
Note that the above won't return functions. For example, typing “Get-Alias” will list “help” as a alias for “Get-Help”. However,
Get-Alias -definition Get-Help will return a error. This is because, technically, “help” is the name of a function, not alias.
# list all functions Get-ChildItem function:*
PowerShell has over 200 cmdlets and functions. Often, you need to know if there's a command that does what you want. You can search them by Get-Command.
gcm) → list commands, including alias, function, etc.
# list all cmdlets whose name has z Get-Command *z* # list all aliases whose name starts with s Get-Command -commandtype alias s*
If you have a question, put $5 at patreon and message me.