This message started showing up when running PowerShell 7:
“Cannot load PSReadLine module. Console is running without PSReadLine.“
**Any commands that are mentioned here were run using PowerShell**
After looking through some documentation, it led to this site:
https://learn.microsoft.com/en-us/powershell/module/psreadline/about/about_psreadline?view=powershell-7.4
Running the command Install-Module -Name PSReadLine -AllowClobber -Force (mentioned in the above site) displayed an error message that was descriptive enough to figure out what the problem was, at least on my system.
I had recently changed the execution policy from RemoteSigned to Restricted using Set-ExecutionPolicy Restricted. Switching it to AllSigned or back to RemoteSigned fixed the problem.
Note that changing the execution policy to AllSigned requires permission to run PSReadLine.
Get-ExecutionPolicy can be used to see what the current execution policy setting is. If it’s already set to AllSigned or RemoteSigned and you’re still seeing the message, this is likely not the problem you are having.
Use either of the following to change the execution policy:
1. Set-ExecutionPolicy AllSigned
OR
2. Set-ExecutionPolicy RemoteSigned
The fix suggested here did not work for me:
https://answers.microsoft.com/en-us/windows/forum/all/powershell-error/224e6ac2-7ef8-4332-9dbd-9bf5f401ecdd
Hopefully this can be helpful to someone else.
-MOOD