In Powershell 2, you'll get a list of defined aliases. It tells, for exemple, that gal
is an alias to get-alias
.
Running Get-Help alias | more
brings this:
PS C:\Users\Fernando> Get-Help alias |
more
PROVIDER NAME
Alias
DRIVES
Alias:
SYNOPSIS
Provides access to the Windows PowerShell aliases and the values that
they represent.
DESCRIPTION
The Windows PowerShell Alias provider lets you get, add, change,
clear, and delete aliases in Windows
PowerShell.
An alias is an alternate name for a cmdlet, function, or executable
file. Windows PowerShell includes a
set of buil
t-in aliases. And, you can add your own aliases to the current
session and to your Windows PowerShell
profile.
The Alias provider is a flat namespace that contains only the alias
objects. The aliases have no child
items.
Each alias is an instance of the System.Management.Automation.AliasInfo
class.
The Alias provider exposes its data store in the Alias: drive. To
work with aliases, you can change your
location t
o the Alias: drive by using the following command:
set-location alias:
Or, you can work from any other Windows PowerShell drive. To reference
an alias from another location, use
the Alia
s: drive name in the path.
Windows PowerShell includes a set of cmdlets that are designed to view
and to change aliases:
Export-Alias
Get-Alias
Import-Alias
New-Alias
Set-Alias
When you use these cmdlets, you do not need to specify the Alias: drive
in the name.
The Alias provider supports all the cmdlets that have the Item noun
except for the Invoke-Item cmdlet.
And, it supp
orts the Get-Content and Set-Content cmdlets. The Alias
provider does not support the cmdlets
that have the ItemPro
perty noun. And, the Alias provider does not support the Filter
parameter in any cmdlet.
All changes to the aliases affect the current session only. To save the
changes, add the changes to the
Windows Pow
erShell profile. Or, use the Export-Alias and Import-Alias cmdlets.