Forum Discussion
powershell makes no sense
- 2 years ago
Anonymous Check your PSModulePath environment variable, should be something like this:
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules\
Anonymous Check your PSModulePath environment variable, should be something like this:
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules\
Why is this so so so so so convoluted; it makes no sense!
The crazy part is that I see no error, why is Powershell pretending to install it and silently failing??
Thanks for your answer Greg_Deckler
I ran $env:PSModulePath
And I get as result:
C:\Users\mari\OneDrive\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules\;C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell
These are 5 paths. crazy! why?!?!
C:\Users\mari\OneDrive\Documents\WindowsPowerShell\Modules
this path doesnt exist. Should I create it?
C:\Program Files\WindowsPowerShell\Modules
I see 5 modules installed hre
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
This seems to be the right one, I see 75 modules, which are the ones I see on my right side in Windows Powershell ISE
C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules\
I see 1 module here
C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell
I see 1 module here