powershell - Server 2012 R2 缺少 PSReadline cmdlet?

标签 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 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

最佳答案

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

Find-Module psreadline | Install-Module

关于powershell - Server 2012 R2 缺少 PSReadline cmdlet?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39780712/

相关文章:

RavenDB 5.3.102 出现安装错误和 Lets Encrypt 错误

oauth-2.0 - ADFS 3.0 的 OAuth 注销端点

powershell - PowerShell 模块(尤其是 PSReadline)如何在 V5 中自动加载?

powershell - 更改 PowerShell PSReadLine MenuComplete 函数的颜色

windows - Windows : how to read Unicode input from console? 上的 GHCi

regex - 如何使用 powershell 将包含 2 个数字的字符串转换为货币?

powershell - 发送-替换HTML电子邮件

powershell - PowerShell 比较运算符背后的推理

windows - 在 Windows 上部署 Meteor

powershell - 找不到与参数名称 'TokenKind' 匹配的参数