August 8th, 2015

PowerTip: Find Commands Exported by PowerShell Module

Doctor Scripto
Scripter

Summary: Find commands that are exported by a Windows PowerShell module.

Hey, Scripting Guy! Question How can I see what commands a Windows PowerShell module provides?

Hey, Scripting Guy! Answer There are two quick ways to find commands exported by a Windows PowerShell module.

The first expands the ExportedCommands property from a module (gmo is an alias for the Get-Module cmdlet):

gmo PSReadline | select -ExpandProperty exportedcommands

The second uses the Get-Command cmdlet (gcm is an alias for Get-Command):

gcm -Module PSreadline

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.