我刚刚使用来自Linux的PowerShell开放源码版本的这个powershell-git套餐在Arch上安装了奥尔。当我尝试PowerShell的-Version功能时,我得到以下信息:
PS /home/user> powershell -Version 5.1
-Version : The term '-Version' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ -Version 5.1
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (-Version:String) [], CommandNot
FoundException
+ FullyQualifiedErrorId : CommandNotFoundException怎么解决这个问题?
发布于 2016-08-31 08:16:51
PowerShell是为Windows编写的,它假定底层文件系统的情况并不重要。当您输入一个PowerShell命令时,程序会读取您输入的任何内容,然后将其与其对情况应该是什么的想法进行匹配并重新显示。
PowerShell的帮助消息将该选项显示为-Version:
-Version
Starts the specified version of Windows PowerShell.
Enter a version number with the parameter, such as "-version 2.0".错误消息是说,它希望使用文件系统的完全拼写名称的概念找到匹配。如果使用帮助消息中所示的混合大小写名称,您可能会获得更好的成功。
https://unix.stackexchange.com/questions/306868
复制相似问题