Closed LKajan closed 6 years ago
@LKajan Are you installing as administrator or non-administrator?
Thanks for your reply. I tried both and the result is same.
@LKajan Thanks for the reply. Do you know if this happens to other machines that you have?
I tested this with two different computers with the same result. And then there is that #524 with the same problem.
@LKajan Unfortunately, I wasn't able to repro the issue and the installation code logic also looks correct. A work around for this would be to install the module from the PowerShell gallery with Install-Module GoogleCloud
. This would get you the latest version of the module as well.
Yup, this is still broken 8 months later - installing Google Cloud SDK by running installer breaks existing PowerShell environment.
I also just had this happen.
Not sure if the case, but this might be breaking folks here - https://github.com/docker/for-win/issues/4452 (me too included, though it started for me after upgrading WIndows from 1806 to 1903)
Same thing happened to me. Installed Cloud SDK via the installer and none of my Modules can now be found.
When installing for single user PSModulePath breaks just like in #524. That Issue was closed by author before it got fixed.
Before installation the $env:PSModulePath looks like this:
C:\Users\lauri\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
And after the installation like this:
;C:\Users\lauri\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\PowerShell;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
My C:\Users\lauri\Documents\WindowsPowerShell\Modules is now missing from the combined $env:PSModulePath.
The installer adds a new User ENV variable PSModulePath with value ';C:\Users\lauri\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\PowerShell'. When this variable exists Windows doesn't "append" User's own module path automatically to the $env:PSModulePath. If I add a %USERPROFILE%\Documents\WindowsPowerShell\Modules to the User PSModulePath env variable everything works ok.