Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Server 2012 R2 missing PSReadline cmdlets?

Works on Win 10 but on server 2012 R2 its not there.

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

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
like image 547
red888 Avatar asked Feb 07 '23 00:02

red888


1 Answers

You can install it from the PowerShell gallery. But I believe you are correct that Windows 10 is the only OS that installs the module by default.

Find-Module psreadline | Install-Module
like image 172
BenH Avatar answered Feb 16 '23 08:02

BenH