February 17th, 2014

PowerTip: Is It a PowerShell Alias?

Doctor Scripto
Scripter

Summary: Quickly find multiple Windows PowerShell aliases.

Hey, Scripting Guy! Question I have a bunch of Windows PowerShell commands I have been using, but they seem to act strangely sometimes.
          I need to know if they are aliases or real commands. How can I tell?

Hey, Scripting Guy! Answer Use the Get-Alias cmdlet to look up aliases and resolve them to Windows PowerShell cmdlet names.
          You can do this in a single command because the –Name parameter accepts an array of aliases, for example:

Get-Alias -Name sort, select, foreach, where, dir, cls

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback