我尝试安装Posh-Git以将ssh与Powershell结合使用。
我按照指示here
此处的文件未进行数字签名,因此我更改了执行策略以进行安装。然后,我(出于任何原因)决定不使用此文件,因此删除了该文件。
现在,每当启动Powershell时,都会出现类似于以下的错误:
The term 'C:\xxx\xxx\profile.example.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program.
如何停止每次启动Powershell时出现此错误消息?
最佳答案
您需要编辑PowerShell配置文件并从那里删除该行。最简单的方法是(在PowerShell中):
notepad $profile
或者,您也可以使用
$profile
查找个人资料,然后在其中编辑文件。请查阅此内容以进一步阅读:https://blogs.technet.microsoft.com/heyscriptingguy/2012/05/21/understanding-the-six-powershell-profiles/
关于powershell - 消除启动时的Powershell错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40887158/