Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet

后端 未结 10 931
刺人心
刺人心 2020-12-14 05:50

I was trying to install Azure using Install-Module Azure in PowerShell. I got the following error:

PS C:\\Windows\\system32> Install-Module A         


        
10条回答
  •  不知归路
    2020-12-14 06:27

    If you are trying to install a module that is listed on the central repository for PS content called PowerShell Gallery, you need to install PowerShellGet. Then the command will be available. I'm currently using PS 4.0. Installing PowerShellGet did the trick for me.

    Source:

    With the latest PowerShellGet module, you can:

    • Search through items in the Gallery with Find-Module and Find-Script
    • Save items to your system from the Gallery with Save-Module and Save-Script
    • Install items from the Gallery with Install-Module and Install-Script
    • Upload items to the Gallery with Publish-Module and Publish-Script
    • Add your own custom repository with Register-PSRepository

    Another great article to get started with PS Gallery.

提交回复
热议问题