Forum Discussion

Rod-F's avatar
Rod-F
Iron Contributor
Jun 04, 2020
Solved

The posh-git.psd1 file not loaded error

Over the weekend I replaced a failing HD with an SSD. Reinstalled Windows 10. Then I tried to install posh-git for PowerShell, but I must have done something wrong. Every time I get into PowerShell now, I get this error message:

 

Import-Module : The specified module 'C:\tools\poshgit\dahlbyk-posh-git-9bda399\src\posh-git.psd1' was not loaded
because no valid module file was found in any module directory.
At C:\Users\rodf\OneDrive\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:2 char:1
+ Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-9bda399\src\posh-git ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (C:\tools\poshgi...c\posh-git.psd1:String) [Import-Module], FileNot
FoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

 

I've tried uninstalling posh-git, but don't know how to do that. In fact, I'm not even sure it's installed. How do I fix this problem and get posh-git working properly, please?

  • Rod-F 

    Looks like you have an entry in one of your Powershell profile files. Check out $Profile variable in Powershell to get your profile file location. Open that file and remove the posh-git entry.

     

    Hope it helps!

    Grtz, Manfred de Laat

2 Replies

  • Manfred101's avatar
    Manfred101
    Iron Contributor

    Rod-F 

    Looks like you have an entry in one of your Powershell profile files. Check out $Profile variable in Powershell to get your profile file location. Open that file and remove the posh-git entry.

     

    Hope it helps!

    Grtz, Manfred de Laat

Resources