May 18th, 2013

PowerTip: Find the Path to a PowerShell Module

Doctor Scripto
Scripter

Summary: Easily find the path to a Windows PowerShell module.

Hey, Scripting Guy! Question How can I easily find the path to a Windows PowerShell module?

Hey, Scripting Guy! Answer Use the Get-Module cmdlet and a wildcard character for the name, and select the Path property.
          The following script finds the PowerShellISEModule (an optional module in the Script Repository):

(Get-Module -ListAvailable PowerShellIse*).path

You can shorten the command:

(gmo -l PowerShellIse*).path

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.