powershell - Get-PSRepository 命令通过两个 Powershell ISE 提供两个输出
问题描述
当我使用 Powershell ISE(x86) 运行 Get-PSRepository 时,它向我显示了受信任的源位置和安装策略。它显示的源位置是https://www.powershellgallery.com/api/v2
但是当我在没有 x86 的情况下使用 Powershell ISE 运行相同的命令时,我收到以下错误:
Get-PSRepository:在模块“PowerShellGet”中找到“Get-PSRepository”命令,但无法加载该模块。有关详细信息,请运行“导入模块 PowerShellGet”。在 line:1 char:1 + Get-PSRepository + ~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-PSRepository:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
为什么powershell使用两个不同的ISE显示两种行为是因为环境变量还是什么?
解决方案
推荐阅读
- vue.js - 具有动态百分比的 scss 中的线性梯度
- java - 使用 html 和 servlet 时出错
- javascript - 如何使用 Vuelidate minValue maxValue
- python - 从 PyQt GUI 打印 MS Word .docx
- javascript - DataMaps / 按标识符隐藏弧
- python - 如何使用谷歌助手在我的服务器上运行本地命令?
- kubernetes - 具有容忍度的 Pod 被调度到没有污染的节点
- python - ImportError:无法导入`pydot`。请安装`pydot`。例如使用 `pip install pydot`
- java - org.openqa.selenium.interactions.MoveTargetOutOfBoundsException: (x, y) is out of bounds while MouseHover with GeckoDriver Firefox Selenium
- appium - 错误:不能将“null”强制转换为有效的版本号