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
FikreDenekeAWS Cloud EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

oBdACommented:
Copy the folder "C:\Program Files\WindowsPowerShell\Modules\PSReadline" to "C:\Program Files (x86)\WindowsPowerShell\Modules", either in Explorer, or from an elevated PS console:
Copy-Item -Path "C:\Program Files\WindowsPowerShell\Modules\PSReadline" -Destination "C:\Program Files (x86)\WindowsPowerShell\Modules" -Recurse

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FikreDenekeAWS Cloud EngineerAuthor Commented:
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."
0
oBdACommented:
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

0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

FikreDenekeAWS Cloud EngineerAuthor Commented:
I am not allowed to run it as Admin mode. Corporate lock-down
0
oBdACommented:
Again (does not require elevation): What's the output of
gci "C:\Program Files (x86)\WindowsPowerShell\Modules\PSReadLine" -Recurse

Open in new window

0
FikreDenekeAWS Cloud EngineerAuthor Commented:
No output. Just returns to command prompts. See screenshotsCapture-2.PNGCapture.PNG
0
oBdACommented:
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)"
0
FikreDenekeAWS Cloud EngineerAuthor Commented:
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
Capture-4.PNG
    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>
0
FikreDenekeAWS Cloud EngineerAuthor Commented:
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
0
oBdACommented:
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

0
FikreDenekeAWS Cloud EngineerAuthor Commented:
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> Capture-5.PNG


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>
0
oBdACommented:
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

0
FikreDenekeAWS Cloud EngineerAuthor Commented:
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
0
oBdACommented:
Question answered.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.