-4

I'm trying to figure out where the built-in modules are hosted in the filesystem. I would've thought it an easy task, but I'm not having much luck. Most/all of the Google results are about getting the path of the current script or adding a search-path. I'm searching the hard drive for the nouns in the names and have not been successful. I've searched for general "ps1" files, in general, and haven't been successful. I've searched both "Program Files" directories and the "Windows" directory as well.

I'm using the ISE to find scripts whose nouns I can search for, but the built-in ones seem uselessly-generically named (too many results) and the proprietary ones are probably located somewhere non-general (as I understand that there's a search-path that might've been updated by the install-process).

Any ideas? Thanks.

  • 2
    Did you forget to use google? ;-) – Colyn1337 May 6 '16 at 19:32
  • @Colyn1337 Have you? Most/all of the results are about getting the path of the current script or adding a search-path. – Dustin Oprea May 6 '16 at 19:48
  • Actually yes, it's how I found the answer to this question when I needed to know years ago. – Colyn1337 May 6 '16 at 20:16
4

For a specific user(s):

%UserProfile%\Documents\WindowsPowerShell\Module 

For all users on the computer:

%ProgramFiles%\WindowsPowerShell\Modules

Documented here in the MSDN document.

  • Also, C:\Windows\System32\WindowsPowerShell\v1.0\Modules (for reference, this is a PS 4.0 system). – Dustin Oprea May 10 '16 at 19:43
  • is this really correct? get-module | select path gives me other paths, especially for the Built-In modules which the OP asked for. as he said correctly they are in C:\Windows\System32\WindowsPowerShell\v1.0\Modulesand some are in C:\program files\windowsPowerShell\modules. Why does the command give me other results, is the command not correct for this task? – SimonS May 11 '16 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.