1

我尝试安装 Posh-Git 以将 ssh 与 Powershell 一起使用。

我按照这里的说明

这里的文件没有数字签名,所以我更改了执行策略来安装它。然后我(无论出于何种原因)决定不使用它,所以我删除了该文件。

现在,每当我启动 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 时,如何阻止出现此错误消息?

4

1 回答 1

10

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/

于 2016-11-30T11:26:37.243 回答