Search

What is a PowerShell Alias

A PowerShell alias is another name assigned to a cmdlet. PowerShell cmdlet names follow a Verb-Noun convention which can be cumbersome to type and use. To minimize typing, and to make it easier for users accustomed to other shells like Windows Command Prompt or Unix shells, Windows PowerShell supports the concept of an alias. Simply, alias is an alternate name for a cmdlet.

Examples:

• "gal" is the alias for Get-Alias cmdlet.

• "cd" is the alias for Set-Location cmdlet.

• "dir" is the alias for Get-ChildItem cmdlet.

• "ls" is another alias for Get-ChildItem cmdlet, for those who are accustomed with Unix shells.

 

To view all the in-built aliases, use the command Get-Alias as show below.

PS C:\> Get-Alias

The output of the above command is shown below.

 

PowerShell Get-Alias cmdlet

Related Tutorials