question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot load PSReadline module. Console is running without PSReadline.

See original GitHub issue

Every time I open powershell I get this error: Cannot load PSReadline module. Console is running without PSReadline. I added an alias to a profile.ps1 file in my user documents folder. (I have since removed it.) I think I started seeing the error after I opened powershell in VSCode the first time after adding the alias. (It asked a question about powershell when I opened it.) But now, all the powershell windows I open give this error. I have tried lots of policy execution changes and trying to install / remove PSReadline but nothing seems to work. I cannot get this error to leave me alone.

$PSVersionTable
Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.19041
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:29 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
daNutzzzzzcommented, Apr 12, 2022

I had to use:

Set-ExecutionPolicy RemoteSigned
Import-Module PSReadline
1reaction
tianbergcommented, May 5, 2022

hi all ,

I had meet same error as @garfieldbanks showd above , and try every suggestions list above .

The error still exists. I could provice some clue which caused to trigger this error .

I installed powershell extension into Visual Studio Code . The vs code powershell console show me below command today :

File D:\apps\powershell\7\Modules\PSReadline\PSReadLine.format.ps1xml is published by CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US and is not trusted on your system. Only run scripts from trusted publishers. [V] Never run [D] Do not run [R] Run once [A] Always run [?] Help(default is “D”): V

I comfirmed the question by input V , which means [V] Never run .

After this moment , each time when I open Windows Terminal , there are always show the message " Cannot load PSReadline module. Console is running without PSReadline. " , even if set the environment policy to Unrestricted .

At current situation , the only way I can load the PSReadline into console is by run command each time when I open console :

Import-Module ‘C:\Program Files\WindowsPowerShell\Modules\PSReadline\2.0.0\PSReadline.psd1’

when the current cosole closed , PSReadline module gone too .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot load PSReadline module. Console is running ...
Solution was: The error may be occurring because of an invalid certificate from Microsoft. Check-in Control Panel => Internet Options => Content ...
Read more >
PowerShell Error
Cannot load PSReadline module. Console is running without PSReadline. An error occurred while creating the pipeline.
Read more >
Cannot load PSReadline module. Console is running ...
A workaround is to install it with Install-Module PSReadLine . If you've removed the module from your system, the message won't go away...
Read more >
How to solve the “Cannot load PSReadline module” Error ...
In this post, we show you how to install it properly so you can get the goodness that comes from the the PSReadline...
Read more >
When I luanch Windows Power Shell x86 I get the error ...
When I luanch Windows Power Shell x86 on a Windows 10 I get the error "Cannot load PSReadline module. Console is running without...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found