Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell Server 2012 R2是否缺少PSReadline cmdlet?_Powershell_Windows Server 2012 R2_Psreadline - Fatal编程技术网

Powershell Server 2012 R2是否缺少PSReadline cmdlet?

Powershell Server 2012 R2是否缺少PSReadline cmdlet?,powershell,windows-server-2012-r2,psreadline,Powershell,Windows Server 2012 R2,Psreadline,适用于Win 10,但在服务器2012 R2上不适用 PS> Get-PSReadlineKeyHandler Get-PSReadlineKeyHandler : The term 'Get-PSReadlineKeyHandler' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a p

适用于Win 10,但在服务器2012 R2上不适用

PS> Get-PSReadlineKeyHandler
Get-PSReadlineKeyHandler : The term 'Get-PSReadlineKeyHandler' 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
+ Get-PSReadlineKeyHandler
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-PSReadlineKeyHandler:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
可以确认我正在运行v5吗

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.0.10586.117
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.117
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

您可以从中安装它。但我相信你是对的,Windows 10是唯一默认安装该模块的操作系统

Find-Module psreadline | Install-Module

我不得不在它的结尾添加
-scope currentuser
:所提到的
-scope
参数@TankorSmash将适用于
安装模块