Gets the aliases for the current session. (Get-Alias)



Gets the aliases for the current session.

Get-Alias [[-Name] <string[]>] [-Exclude <string[]>] [-Scope <string>] [<CommonParameters>]

Get-Alias [-Definition <string[]>] [-Exclude <string[]>] [-Scope <string>] [<CommonParameters>]

The Get-Alias cmdlet gets the aliases (alternate names for commands and executable files) in the current session. This includes built-in aliases, aliases that you have set or imported, and aliases that you have added to your Windows PowerShell profile.

By default, Get-Alias takes an alias and returns the command name. When you use the Definition parameter, Get-Alias takes a command name and returns its aliases.

-Definition <string[]>
Gets the aliases for the specified item. Enter the name of a cmdlet, function, script, file, or executable file.

This parameter is called Definition, because it searches for the item name in the Definition property of the alias object.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Exclude <string[]>
Omits the specified items. The value of this parameter qualifies the Name and Definition parameters. Enter a name, a definition, or a pattern, such as "s*". Wildcards are permitted.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Name <string[]>
Specifies the aliases to retrieve. Wildcards are permitted. By default, Get-Alias retrieves all aliases defined for the current session. The parameter name ("Name") is optional. You can also pipe alias names to Get-Alias.

Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Scope <string>
Gets only the aliases in the specified scope. Valid values are "Global", "Local", or "Script", or a number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent). "Local" is the default. For more information, see about_Scopes.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

You can pipe alias names to Get-Alias.

Get-Alias returns an object that represents each alias.


An alias is an alternate name or nickname for a cmdlet, function, or an executable file. To run the cmdlet, function, or executable, you can use its full name or any alias. For more information, see about_Aliases.

To create a new alias, use Set-Alias or New-Alias. To delete an alias, use Remove-Item.



# Description
This command gets all aliases in the current session.


C:\PS>get-alias -name g*, s* -exclude get-*

# Description
This command gets all aliases that begin with "g" or "s", except for aliases that begin with "get-".


C:\PS>get-alias -definition Get-ChildItem

# Description
This command gets the aliases for the Get-ChildItem cmdlet.

By default, the Get-Alias cmdlet gets the item name when you know the alias. The Definition parameter gets the alias when you know the item name.


C:\PS>get-alias | where-object {$_.Options -match "ReadOnly"}

# Description
This command retrieves all aliases in which the value of the Options property is ReadOnly. This command provides a quick way to find the aliases that are built into Windows PowerShell, because they have the ReadOnly option.

Options is just one property of the AliasInfo objects that Get-Alias gets. To find all properties and methods of AliasInfo objects, type "get-alias | get-member".


C:\PS>get-alias -definition "*-pssession" -exclude e* -scope global

# Description
This example gets aliases for commands that have names that end in "-pssession", except for those that begin with "e".

The command uses the Scope parameter to apply the command in the global scope. This is useful in scripts when you want to get the aliases in the session.

Online version:
Alias Provider

C:\Windows>powershell get-help Get-Culture -full

ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2014 Microsoft Corporation.

OS: Windows 10, 8.1, 8, 7, Vista / Windows Server 2016, 2012, 2008
»»»» ColorConsole

... Home  
... Impressum
... ColorConsole

... CMD
... Netsh-XP
... Netsh-7
... Netsh-Vista
... Powershell
... FAQ

Download the Windows 10 Starter, Home (Basic Premium), Professional und Ultimate!

HTTP: ... PS_Windows/en/Get-Alias.htm

Windows 8 on screen keypad at startup, start page, log in without keyboard?


In Windows-10 Doppelt-Tipp-Zeit bei Touch Screens  ändern?


Wie kann ich in Q-Dir die Bildervorschau aktivieren?


Ich muss mich am Windows Server 2008 immer mit Passwort anmelden?


What makes TripAdvisor on my smart phone is it a virus?


Installieren der Google Toolbar bei meinem Firefox und / oder Internet-Explorer, aber wie?


When drag drop are not all files and folders added to the list?


Der Netzlaufwerk-Ordner verschwindet immer wieder?