How to get available commands from the module?

To find out which powershell modules are available on the machine, I use the command

Get-Module -ListAvailable 

Returns a list with the module name, name and exported commands. But exported commands are always empty and just display {} Why is this not displayed? Should I use a different parameter or is there a different cmdlet or method to retrieve the available commands?

+46
module powershell
Jun 15 '11 at 7:17
source share
2 answers

Exported commands are not available if the module is not loaded. First you need to load the module, and then run the get-command:

 Import-Module -Name <ModuleName> Get-Command -Module <ModuleName> 
+79
Jun 15 2018-11-11T00:
source share

Use the -ListAvailable parameter

 Get-Module <moduleName> -ListAvailable | % { $_.ExportedCommands.Values } 

" <moduleName> " is optional. Lower to show all available modules.

+8
Nov 23 '16 at 12:05
source share



All Articles