Set-Alias
noun
say it: “SET AY-lee-us” /ˈsɛt ˈeɪliəs/
A PowerShell command that gives another command a short extra name of your choosing.
What does Set-Alias do?
Set-Alias gives a command a short name of your own. An alias stands for one command and nothing more: it can't hold a value or run two steps, which is a job for a small function. Check first with Get-Command that the name is free.
Set-Alias -Name touch -Value New-Item
touch shopping-list.txt
In a sentence
- “Sam used Set-Alias so that touch makes a new file.”
- “Set-Alias can't remember a folder, so Sam wrote a small function instead.”
Level: Apprentice · More PowerShell terms at this level
Updated