PowerTip: Use PowerShell to Find Aliases Exported by All Modules

Doctor Scripto

Summary: Use Windows PowerShell to find all the aliases that are exported by all modules.

Hey, Scripting Guy! Question How can I find all of the aliases that are exported by all Windows PowerShell modules?

Hey, Scripting Guy! Answer Import all modules, use the Get-Module cmdlet to list all modules, use Get-Module to get the module, and then select the name of the module and the ExportedAliases property:

Get-Module -l | Import-Module

Get-Module -l | Get-Module | Where-Object {$_.ExportedAliases.count -gt 0} |

Select-Object name, ExportedAliases | Format-Table -AutoSize -Wrap

Note  The output may contain truncated data. This is controlled by the $FormatEnumerationLimit preference variable. For more information about this, see the Hey, Scripting Guy! Blog, Change a PowerShell Preference Variable to Reveal Hidden Data.


Discussion is closed.

Feedback usabilla icon