PowerTip: Find the Path to a PowerShell Module

Doctor Scripto

Dr Scripto

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

Doctor Scripto
Dr Scripto

Scripter, PowerShell, vbScript, BAT, CMD

Follow Dr Scripto   

0 comments

    Leave a comment