Windows installer breaks PSModulePath
See original GitHub issueI have a number of user-scope modules installed in ~/Documents/WindowsPowerShell/Modules
, which is in the PSModulePath by default. After installing via the windows installer, under user variables, my PSModulePath was set to ;C:\Users\justin\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\PowerShell
(note the leading ;
, which looks like a failed attempt to append to the existing path), which caused the default path to not be searched, and my modules to all fail to import. This was a simple fix once I had figured out what was going on, but it took some time to discover.
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Cannot install powershell modules - Microsoft Q&A
My problem is that I am not able to install modules to my powershell console. Example: Install-module -Name AzureAD. Copy.
Read more >About PowerShell Module Paths
About PowerShell Module Paths. This page relates my battle with OneDrive folder backup and how I fixed my broken $env:PSModulePath.
Read more >How do I fix a broken Powershell installation?
on a windows server 2008 r2 sp1 machine, i used chocolatey to install the AWSTools.Powershell package. this, in turn, installed powershell 3.
Read more >Solved: PowerCLI 6.5.1 seems to break PowerShell Help
PowerCLI" to install latest version of PowerCLI. ... seems to stem from the PowerShell 5.0 code present on Windows 10 version 1511. ......
Read more >PSModulePath missing default folder after PowerCLI...
The problem is linked to Environment variables. A fresh install of Windows has a SYSTEM PSModulePath variable defined but no USER one. In...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems like the issue happens if the PSModulePath for User is empty initially. We are fixing this in the next cloud SDK release.
I got this problem (my PSModulePath is broken) and actually, I need to use SDK and some modules that are getting fail to import. Sorry, but I’m a little bit beginner with this, so how I can fix that? To continue to use SDK and my modules. I mean, how can I get back the PSModulePath working again?