PowerTip: Find the Path to a PowerShell Module

PowerTip: Find the Path to a PowerShell Module

  • Comments 1
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • I've enjoyed your tips 'foreva'; however, this one is not working for me...

    Get-Module -ListAvailable returns my modules...
    ModuleType Name ExportedCommands
    ---------- ---- ----------------
    Manifest ActiveDirectory {}
    Manifest ADRMS {}
    Manifest ADRMSAdmin {}
    Manifest AppLocker {}
    etc...

    but even '(Get-Module -ListAvailable).path' - without the PowerShell* filter returns nothing?