Modules not recognized in Powershell 5.1 #6363

Closed
opened 2026-01-31 00:36:45 +00:00 by claunia · 3 comments
Owner

Originally created by @hakito on GitHub (Feb 10, 2020).

I recently did a fresh install of Windows 10 Pro. After some time I recognized that Ctrl-R (back-i-search) did not work anymore. I tried to follow instructions of #350 to resolve the problem. But when I tried to call Get-PSReadLineOption or Install-Module I got errors.

I also tried deleting the whole powershell folder c:\Windows\System32\WindowsPowerShell\v1.0\ and ran sfc /scannow but still ctrl-r is not working.

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.592]
Powershell Version (if applicable): 
Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      18362  145

Steps to reproduce

PS: C:> Install-Module

Expected behavior

cmdlet Install-Module at command pipeline position 1
Supply values for the following parameters:
Name[0]:

Actual behavior

Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1

  • Install-Module
  •   + CategoryInfo          : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
Originally created by @hakito on GitHub (Feb 10, 2020). I recently did a fresh install of Windows 10 Pro. After some time I recognized that Ctrl-R (back-i-search) did not work anymore. I tried to follow instructions of #350 to resolve the problem. But when I tried to call ```Get-PSReadLineOption``` or ```Install-Module``` I got errors. I also tried deleting the whole powershell folder ```c:\Windows\System32\WindowsPowerShell\v1.0\``` and ran ```sfc /scannow``` but still ctrl-r is not working. # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18363.592] Powershell Version (if applicable): Major Minor Build Revision ----- ----- ----- -------- 5 1 18362 145 ``` # Steps to reproduce PS: C:\> Install-Module # Expected behavior cmdlet Install-Module at command pipeline position 1 Supply values for the following parameters: Name[0]: # Actual behavior Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + Install-Module + ~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
claunia added the Needs-TriageNeeds-Tag-FixResolution-Won't-Fix labels 2026-01-31 00:36:45 +00:00
Author
Owner

@wsmelton commented on GitHub (Feb 10, 2020):

You might try installing the beta release of PSReadLine. Many issues are due to be fixed in PSReadLine once they release it.

In addition if Install-Module is not found that is generally due to the PackageManagement and/or PowerShellGet somehow was removed/corrupted. I have had to reinstall those packages as well to get the install module command working again.

@wsmelton commented on GitHub (Feb 10, 2020): You might try installing the beta release of PSReadLine. Many issues are due to be fixed in PSReadLine once they release it. In addition if `Install-Module` is not found that is generally due to the PackageManagement and/or PowerShellGet somehow was removed/corrupted. I have had to reinstall those packages as well to get the install module command working again.
Author
Owner

@hakito commented on GitHub (Feb 10, 2020):

How can I install it manually? (And why does sfc /scannow only fix powershell partially?)

@hakito commented on GitHub (Feb 10, 2020): How can I install it manually? (And why does ```sfc /scannow``` only fix powershell partially?)
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 10, 2020):

It sounds like you have a corrupt installation of Windows PowerShell, and there's nothing Terminal (or Console) can do to help you with that. Sorry. I'm going to have to bounce you out to the Powershell repository.

@DHowett-MSFT commented on GitHub (Feb 10, 2020): It sounds like you have a corrupt installation of Windows PowerShell, and there's nothing Terminal (or Console) can do to help you with that. Sorry. I'm going to have to bounce you out to the Powershell repository.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6363