我在安装scoop包管理器的时候,提示 Invoke-Expression : 无法将“Select-CurrentVersion”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。

建华 陈 21 Reputation points
2022-03-08T07:52:41.093+00:00

当我在安装scoop包管理器
在powershell命令行界面输入Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')时,
提示我

Invoke-Expression : 无法将“Select-CurrentVersion”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,
请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1

  • Invoke-Expression (New-Object System.Net.WebClient).DownloadString('h ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : ObjectNotFound: (Select-CurrentVersion:String) [Invoke-Expression], CommandNotFoundException
  • FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.InvokeExpressionCommand
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,537 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 110K Reputation points MVP
    2022-03-08T08:05:01.123+00:00

    Hi @建华 陈 ,

    the issue is maybe a bug.
    Please take a look here: https://github.com/ScoopInstaller/Scoop/issues/4783

    It seems it's a bug related to scoop and not related to PowerShell. For that reason please follow the thread on GitHub or open an "issue" over there.

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.