Manual install PS modules - PSModulePath

I have to manual install (copy) PS modules from my central PS-module-repository onto different machines (all of them are 64-Bit).

But the first entry in PSModulePath on these machines sometimes is C:\Program Files (x86)\WindowsPowerShell\Modules and sometimes is C:\Program Files\WindowsPowerShell\Modules.

Whereto should I install? Must I use the first entry in PSModulePath?

Thanks - Michael

With what version of PowerShell would you like to use these modules? If you run the 64-bit version of PowerShell you should install them to “Program Files”. For the 32-bit version you use “Program Files (x86)”. :man_shrugging:t4:

And BTW: It would have taken you a few minutes to figure that out by yourself. :wink:

BTW: I really did spend some time on Google and found the information you sent but my problem is not mentioned: On some of my 64-bit-machines running 64-bit Powershell the PSModulePath points to C:\Program Files (x86)\WindowsPowerShell\Modules: Should I change the path to C:\Program Files\WindowsPowerShell\Modules and install there?

Thanks - Michael

There might be something wrong with your infrastructure. Usually the $env:PSModulePath for Windows PowerShell looks like this for a 64-bit PowerShell console:

C:\Users\<username>\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

and like this for a 32-bit PowerShell console:

C:\Program Files\WindowsPowerShell\Modules
C:\Users\<username>\Documents\WindowsPowerShell\Modules
C:\Program Files (x86)\WindowsPowerShell\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

Might be caused by the fact that these systems originated from a Windows 7 installation (nevertheless those were 65-bit-installations from the beginnning).

I will:

  • change the PSModulePath to C:\Program Files\WindowsPowerShell\Modules on these machines
  • move the modules form C:\Program Files (x86)\WindowsPowerShell\Modules thereto
  • and install new modules there

Thanks again - Michael

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.