question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows installer breaks PSModulePath

See original GitHub issue

I 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:open
  • Created 6 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
quoctruongcommented, Sep 11, 2019

It seems like the issue happens if the PSModulePath for User is empty initially. We are fixing this in the next cloud SDK release.

0reactions
Tayaahcommented, Dec 2, 2020

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found