【发布时间】:2020-12-31 12:11:38
【问题描述】:
我正在尝试在 Windows 10 中通过 Powershell 安装公司工具,它需要 PowerShell 版本 7.0+,但是当我尝试调用我们的公司工具时,我的 Windows 中似乎有两个版本的 PowerShell,我收到了这个错误:
The 'Tool-Name' command was found in the module 'PCP.AWS', but the module could not be loaded. For more information, run 'Import-Module PCP.AWS'.
然后我运行命令“Import-Module PCP.AWS”,但出现此错误:
Import-Module : The version of Windows PowerShell on this computer is '5.1.18362.145'. The module 'C:\Program Files
(x86)\WindowsPowerShell\Modules\PCP.AWS\0.0.23\PCP.AWS.psd1' requires a minimum Windows PowerShell version of '7.0' to run. Verify that you have the minimum required version of Windows PowerShell installed, and then try again.
这是我运行 pwsh -V PowerShell 7.1.0 时的输出,但如果我运行 Get-Host | Select-Object Version 我也可以得到一个输出
Version
-------
5.1.18362.145
谁能建议我应该怎么做才能让这个工具可以运行?我应该通过特定的 PowerShell 版本来运行这个工具,还是应该在我的笔记本电脑中删除旧版本的 PowerShell?
【问题讨论】:
标签: powershell