简体   繁体   中英

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?

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM