Share via

PowerShell error : Install-module is not recognized as the name of a cmdlet on Powershell 5.1 with Nuget installed

Anonymous
2021-04-14T17:55:30+00:00

HI, 

I am trying to install a powershellmodule and getting the below error message.

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 SharePointOnlinePowerShell

+ ~~~~~~~~~~~~~~

+ CategoryInfo          : ObjectNotFound: (install-module:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

i tried get-packageproviders and it seems to have Nuget package installed. 

Name                     Version          DynamicOptions

----                     -------          --------------

msi                      3.0.0.0          AdditionalArguments

msu                      3.0.0.0

NuGet                    3.0.0.1          Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigF...

Programs                 3.0.0.0          IncludeWindowsInstaller, IncludeSystemComponent

I tried all troubleshooting steps stated in this(https://stackoverflow.com/questions/41585758/install-module-the-term-install-module-is-not-recognized-as-the-name-of-a-cm) article, but they didn't help. any suggestions?

Windows for home | Windows 10 | Install and upgrade

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-04-14T18:59:21+00:00

    Hi, my name is Jose. I'm an Independent Advisor and a Windows user like you. I'll be glad to help you today.

    Lets verify if the PowerShell Repository is not registered. Please open the PowerShell console and paste this command:

    Get-PSRepository

    The output result must display the url https://www.powershellgallery.com

    if not, you can reset it using the following command:

    Register-PSRepository -Default

    Please let me know if you need any further assistance.

    5 people found this answer helpful.
    0 comments No comments