I am following the directions to install poshgit. In doing so I ran:
Install-Module posh-git
Error:
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 t ry again.
I ran $PSVersionTable.PSVersion
: result = 2.0.-1.-1
Is Install-Module
an addon? How can I run this command?
How do I get PowerShell modules? The PowerShell system is already available within the Windows operating system and you probably already have many modules available. At the PowerShell prompt, type Get-Module -ListAvailable to see which modules are active. To install a module, use the Get-InstalledModule cmdlet.
If that module is missing, corrupt, or got moved, it throws up the error, “the term is not recognized as the name of a cmdlet.” You can use “get-module” in PowerShell to see if the module is present and correct. It will show you what modules are loaded, and you can add or repair them depending on your needs.
Do you have PsGet
installed? That's the Installing via PsGet section.
The section after that is the manual instructions:
Verify you have PowerShell 2.0 or better with $PSVersionTable.PSVersion
Verify execution of scripts is allowed with
Get-ExecutionPolicy
(should beRemoteSigned
orUnrestricted
). If scripts are not enabled, run PowerShell as Administrator and callSet-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
.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.Clone the posh-git repository to your local machine.
From the posh-git repository directory, run
.\install.ps1
.Enjoy!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With