Link to home
Create AccountLog in
Powershell

Powershell

--

Questions

--

Followers

Top Experts

Avatar of FikreDeneke
FikreDeneke🇺🇸

When I luanch Windows Power Shell x86 I get the error "Cannot load PSReadline module. Console is running without PSReadline."
When I luanch Windows Power Shell x86 on a Windows 10 I get the error "Cannot load PSReadline module.  Console is running without PSReadline." When I run Windows PowerShell 64bt I don't have this problem. I have tried the below with no luck.

Install-Module PSReadLine

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of oBdAoBdA

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of FikreDenekeFikreDeneke🇺🇸

ASKER

I couldn't do it with the command as I received Access Denied, but I copied it manually and put in my credentials. The folders copied over, but I still get the same PowerShell error.

"Cannot load PSReadline module.  Console is running without PSReadline."

I couldn't do it with the command as I received Access Denied - that's why I said "from an elevated PS console".
Did you restart the x86 console?
What's the output of
gci "C:\Program Files (x86)\WindowsPowerShell\Modules\PSReadLine" -Recurse

Open in new window


Avatar of FikreDenekeFikreDeneke🇺🇸

ASKER

I am not allowed to run it as Admin mode. Corporate lock-down

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Again (does not require elevation): What's the output of
gci "C:\Program Files (x86)\WindowsPowerShell\Modules\PSReadLine" -Recurse

Open in new window


Avatar of FikreDenekeFikreDeneke🇺🇸

ASKER

No output. Just returns to command prompts. See screenshotsUser generated imageUser generated image

If the gci command doesn't return any output, then you didn't copy the folder correctly.
The folder "C:\Program Files\WindowsPowerShell\Modules\PSReadline" must end up as a child of "C:\Program Files (x86)\WindowsPowerShell\Modules".
gci "C:\Program Files (x86)\WindowsPowerShell\Modules

Open in new window

must return (among whatever else is installed) the PSReadline folder you copied.

gci "C:\Program Files\WindowsPowerShell\Modules\PSReadline\" -Recurse -File | select FullName

Open in new window

Should return something like this (Windows 10 1709):
C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.1\PSReadline_5714753b-2afd-4492-a5fd-01d9e2cff8b5_HelpInfo.xml
C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.1\en-US\Microsoft.PowerShell.PSReadline.dll-help.xml
C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.2\Microsoft.PowerShell.PSReadline.dll
C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.2\PSReadline.psd1
C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.2\PSReadline.psm1
C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.2\PSReadline_5714753b-2afd-4492-a5fd-01d9e2cff8b5_HelpInfo.xml
C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.2\en\Microsoft.PowerShell.PSReadline.Resources.dll
C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.2\en-US\Microsoft.PowerShell.PSReadline.dll-help.xml

Open in new window

And that's the same result the command should return when "Program Files" is replaced with "Program Files (x86)"

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of FikreDenekeFikreDeneke🇺🇸

ASKER

I had copied the folder into the other Program Files folder. After I copied to x86 here is the output of the command.

PS C:\Users\593444> gci "C:\Program Files (x86)\WindowsPowerShell\Modules\PSReadLine" -Recurse


    Directory: C:\Program Files (x86)\WindowsPowerShell\Modules\PSReadLine


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        1/30/2018   2:57 PM                1.2


    Directory: C:\Program Files (x86)\WindowsPowerShell\Modules\PSReadLine\1.2


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        1/30/2018   2:57 PM                en
-a----        7/16/2016   7:45 AM         216576 Microsoft.PowerShell.PSReadline.dll
-a----        7/16/2016   7:45 AM            760 PSReadline.psd1
-a----        7/16/2016   7:45 AM            180 PSReadline.psm1
User generated image
    Directory: C:\Program Files (x86)\WindowsPowerShell\Modules\PSReadLine\1.2\en


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        7/16/2016  10:11 AM          29696 Microsoft.PowerShell.PSReadline.Resources.dll


PS C:\Users\593444>

Avatar of FikreDenekeFikreDeneke🇺🇸

ASKER

I just ran nstall-Module PSReadLine and received a different error.

PS C:\Users\593444> Install-Module PSReadLine
Install-Module : The 'Install-Module' command was found in the module 'PowerShellGet', but the module could not be
loaded. For more information, run 'Import-Module PowerShellGet'.
At line:1 char:1
+ Install-Module PSReadLine
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

PSReadLine comes with Windows 10. There is no need to install it.
Open a new x86 console, and it should load the module automatically. Otherwise, or for the current window, use
Import-Module PSReadline -Verbose

Open in new window

Or if it still doesn't work:
Import-Module "C:\Program Files (x86)\WindowsPowerShell\Modules\PSReadline\1.2\PSReadline" -Verbose

Open in new window


Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of FikreDenekeFikreDeneke🇺🇸

ASKER

Here is the output of both commands. The import is referencing the wrong Program Files - C:\Program Files and it should be x86 . I copied the PSReadline folder to both folders.


PS C:\Users\593444> Import-Module PSReadline -Verbose
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.2\PSReadline.psd1'.
VERBOSE: Loading module from path 'C:\Program
Files\WindowsPowerShell\Modules\PSReadline\1.2\Microsoft.PowerShell.PSReadLine.dll'.
VERBOSE: Importing cmdlet 'Get-PSReadlineOption'.
VERBOSE: Importing cmdlet 'Set-PSReadlineOption'.
VERBOSE: Importing cmdlet 'Set-PSReadlineKeyHandler'.
VERBOSE: Importing cmdlet 'Get-PSReadlineKeyHandler'.
VERBOSE: Importing cmdlet 'Remove-PSReadlineKeyHandler'.
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.2\PSReadLine.psm1'.
Import-Module : File C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.2\PSReadLine.psm1 cannot be loaded
because running scripts is disabled on this system. For more information, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ Import-Module PSReadline -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [Import-Module], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.PowerShell.Commands.ImportModuleCommand
PS C:\Users\593444> User generated image


PS C:\Users\593444> Import-Module "C:\Program Files (x86)\WindowsPowerShell\Modules\PSReadline\1.2\PSReadline" -Verbose
VERBOSE: Loading module from path 'C:\Program Files (x86)\WindowsPowerShell\Modules\PSReadline\1.2\PSReadline.psd1'.
VERBOSE: Loading module from path 'C:\Program Files
(x86)\WindowsPowerShell\Modules\PSReadline\1.2\Microsoft.PowerShell.PSReadLine.dll'.
VERBOSE: Importing cmdlet 'Get-PSReadlineOption'.
VERBOSE: Importing cmdlet 'Set-PSReadlineOption'.
VERBOSE: Importing cmdlet 'Set-PSReadlineKeyHandler'.
VERBOSE: Importing cmdlet 'Get-PSReadlineKeyHandler'.
VERBOSE: Importing cmdlet 'Remove-PSReadlineKeyHandler'.
VERBOSE: Loading module from path 'C:\Program Files (x86)\WindowsPowerShell\Modules\PSReadline\1.2\PSReadLine.psm1'.
VERBOSE: Exporting function 'PSConsoleHostReadline'.
VERBOSE: Exporting cmdlet 'Get-PSReadlineOption'.
VERBOSE: Exporting cmdlet 'Set-PSReadlineOption'.
VERBOSE: Exporting cmdlet 'Set-PSReadlineKeyHandler'.
VERBOSE: Exporting cmdlet 'Get-PSReadlineKeyHandler'.
VERBOSE: Exporting cmdlet 'Remove-PSReadlineKeyHandler'.
VERBOSE: Importing cmdlet 'Get-PSReadlineKeyHandler'.
VERBOSE: Importing cmdlet 'Get-PSReadlineOption'.
VERBOSE: Importing cmdlet 'Remove-PSReadlineKeyHandler'.
VERBOSE: Importing cmdlet 'Set-PSReadlineKeyHandler'.
VERBOSE: Importing cmdlet 'Set-PSReadlineOption'.
VERBOSE: Importing function 'PSConsoleHostReadline'.
PS C:\Users\593444>

Doesn't matter where it's loading from. It's the same files, after all.
Now the execution policy for the x86 version, and you should be good to go.
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force

Open in new window


Avatar of FikreDenekeFikreDeneke🇺🇸

ASKER

That is it. Awesome. Thank you. Let me know if there is anything I can do for as I already clicked Best Solution.

Since you are so well versed with PS can you take a look at this posting that no one else could answer.

AWS & PowerShell - I can't run PS commands within any new server in AWS (W2K8R2-W2K16)

https://www.experts-exchange.com/questions/29077625/AWS-PowerShell-I-can't-run-PS-commands-within-any-new-server-in-AWS-W2K8R2-W2K16.html

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Question answered.
Powershell

Powershell

--

Questions

--

Followers

Top Experts

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to the Component Object Model (COM) and Windows Management Instrumentation (WMI), enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and Common Information Model (CIM) enabling management of remote Linux systems and network devices.