January 23rd, 2014

PowerTip: Find PowerShell Aliases that Rename Commands

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to find aliases that rename commands.

Hey, Scripting Guy! Question How can I find Windows PowerShell aliases that rename commands?

Hey, Scripting Guy! Answer Use the Get-Alias cmdlet, pipe the results to Where-Object, and look for a hyphen in the name:

Get-Alias | Where name -Match '-' | select name, definition

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.