[英]Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet (PS ver. 5.x !!)
i believe the title is self explanatory. 我相信标题是不言自明的。 The install-module isn't working anymore.
安装模块不再起作用。 I had it running earlier, but after downloading NuGet through powershell the module doesn't work anymore at all, giving me the error message shown in the title.
我早先运行过它,但是在通过powershell下载NuGet之后,该模块不再起作用了,这给了我标题中显示的错误消息。 I'm running on Windows 10, Powershell Ver.: 5.1.16299.15.
我正在Windows 10 Powershell版本上运行:5.1.16299.15。
The question has been asked before, but on other threads the problem was the Powershell version, which isn't the case for me. 之前已经问过这个问题,但是在其他线程上,问题是Powershell版本,对我而言不是这种情况。
Gotcha! 知道了! - From above discussions,
-通过以上讨论,
Did you change $env:PSModulePath
? 您更改了
$env:PSModulePath
吗? Nuget installation would not change it. Nuget安装不会更改它。 You can add
C:\\Program Files\\WindowsPowerShell\\Modules
in the list and try. 您可以在列表中添加
C:\\Program Files\\WindowsPowerShell\\Modules
并尝试。
$env:PSModulePath += ';C:\Program Files\WindowsPowerShell\Modules'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.