Unable to find Install-Module cmdlet in Powershell 5.1 on Window 10

Welcome Forums General PowerShell Q&A Unable to find Install-Module cmdlet in Powershell 5.1 on Window 10

Viewing 4 reply threads
  • Author
    Posts
    • #261377
      Participant
      Topics: 3
      Replies: 7
      Points: 57
      Rank: Member

      Hello,

      I am getting an below error post deleting the modules in my local machine. Someone please suggest how to start use install-module cmdlet in my laptop machine.

       

      Error :

      PS C:\Users\arumugam.murugan> Install-Module -Name Az
      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 -Name Az
      + ~~~~~~~~~~~~~~
      + CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

    • #261428
      Participant
      Topics: 0
      Replies: 1
      Points: -5
      Rank: Member

      Have you tried to use update-help?  Make sure you have the current updates.

    • #261530
      Senior Moderator
      Topics: 10
      Replies: 184
      Points: 980
      Helping Hand
      Rank: Major Contributor

      Check the Install-Module documentation and verify that you are using a supported version of PowerShell.

    • #262739
      Participant
      Topics: 0
      Replies: 13
      Points: 134
      Helping Hand
      Rank: Participant

      Install-Module is part of the PowerShellGet module

      Run the following command:

      If you don’t get comparable output then Google how to install PowerShellGet

      • This reply was modified 1 week, 6 days ago by grokkit. Reason: code formatting
    • #262757
      Participant
      Topics: 0
      Replies: 13
      Points: 134
      Helping Hand
      Rank: Participant

      Also you may NOT have PowerShellGet installed. Follow the instructions at: https://docs.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7

      You will need to have .NET 4.5 or higher installed. Commands in weblink need to be run from an elevated prompt (Run as Administrator)

      After installing the NuGet package provider you can then install PowerShellGet. All instructions are at the weblink.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.