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

后端 未结 2 1124
孤城傲影
孤城傲影 2021-01-17 07:41

I am following the directions to install poshgit. In doing so I ran:

Install-Module posh-git

Error:

The term \'Install-M

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-17 08:16

    Do you have PsGet installed? That's the Installing via PsGet section.

    The section after that is the manual instructions:

    1. Verify you have PowerShell 2.0 or better with $PSVersionTable.PSVersion

    2. Verify execution of scripts is allowed with Get-ExecutionPolicy (should be RemoteSigned or Unrestricted). If scripts are not enabled, run PowerShell as Administrator and call Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm.

    3. Verify that git can be run from PowerShell. If the command is not found, you will need to add a git alias or add %ProgramFiles(x86)%\Git\cmd (or %ProgramFiles%\Git\cmd if you're still on 32-bit) to your PATH environment variable.

    4. Clone the posh-git repository to your local machine.

    5. From the posh-git repository directory, run .\install.ps1.

    6. Enjoy!

提交回复
热议问题