powershellposh-git

Remove Powershell error on startup


I tried to install Posh-Git to use ssh with Powershell.

I followed the instructions here

The file here was not digitally signed so I changed the Execution Policy to install it. I then (for whatever reason) decided not to use this so I removed the file.

Now whenever I start Powershell I get an error similar to the below:

The term 'C:\xxx\xxx\profile.example.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program.

How do I stop this error message from appearing each time I start Powershell?


Solution

  • You need to edit your PowerShell profile and remove that line from there. The easiest way would be (from within your PowerShell):

    notepad $profile
    

    or alternatively you can look up your profile with $profile and edit the file there.

    Consult this for further reading: https://blogs.technet.microsoft.com/heyscriptingguy/2012/05/21/understanding-the-six-powershell-profiles/