Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Find PowerShell Aliases for Cmdlets from a Specific Module

$
0
0

Summary: See how to find all Windows PowerShell aliases for cmdlets and functions exposed by a specific module.

Hey, Scripting Guy! Question How can I find all of the aliases defined for commands (functions or cmdlets) in a specific module?

        Hey, Scripting Guy! Answer Use the Get-Command cmdlet (gcm is alias) to return all the commands from the module, and then use the Get-Alias cmdlet (gal is alias) to look for aliases with a definition of the command name.

gcm -Module *utility* | % {gal -Definition $_.name -ea 0}

Note   *utility* is a wildcard pattern for the Microsoft.PowerShell.Utility module.


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>