简体   繁体   English

Server 2012 R2缺少PSReadline cmdlet?

[英]Server 2012 R2 missing PSReadline cmdlets?

Works on Win 10 but on server 2012 R2 its not there. 适用于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

Can confirm I'm running v5 可以确认我正在运行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

You can install it from the PowerShell gallery . 您可以从PowerShell库中安装它。 But I believe you are correct that Windows 10 is the only OS that installs the module by default. 但我相信你是正确的,Windows 10是唯一默认安装该模块的操作系统。

Find-Module psreadline | Install-Module

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM