Unable to uninstall PSReadLine

All, I am trying to install PSReadLine to explore the “Predictive Intellisense” . However, when I installed PSReadLine and enabled that feature…

below is the msg I got.
Set-PSReadLineOption: A parameter cannot be found that matches parameter name ‘PredictionSource’

with little google search I found this

when I tried to uninstall PSReadLine this is what I got.

that said, when I checked for any version of psreadline…I still see the bottom versions.

can some one please let me know how I can uninstall all the versions currently installed on machine and do a clean install. I even tried exiting the PowerShell session hoping that would solve the problem.

TIA.

You have version 2.0.0 of PSReadline and the PredictionSource parameter was introduced in 2.1.0.

Try upgrading PSReadline. Running PowerShell as an Administrator:

powershell -noprofile -command "Install-Module PSReadline -Force"

Two things you may need to do if you get an error or have problems updating it:

Set the TLS version:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Update PowerShellGet:

powershell -noprofile -command "Install-Module -Name PowerShellGet -Force -AllowClobber"
2 Likes

Thank you @matt-bloomfield for the reply.

I have couple of q’s -
#1. how/where do I set the following:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

I have updated PowerShellGet and re-installed psreadline…I still get the same error.

#2. If I have couple of different versions, does PowerShell use the latest version or do I have a choice of specifying the version to use?

pls let me know if I am doing anything wrong here. thank you!

  1. Just run the command in a PowerShell prompt. You can add it to your profile if you want to make it permanent.

  2. It should load the latest version when you restart PowerShell. If you want to load an earlier version, use Remove-Module then Import-Module using the -MaximumVersion parameter.

Also, as a tip for future posts, please try to copy and paste your output and format it with the </> button rather than posting images.

2 Likes

Thank you @matt-bloomfield …it worked.

1 Like