默认情况下将 Powershell 预测智能感知设置为关闭

Ric*_*ich 2 powershell powershell-7.0 windows-11

我在 Windows 11 中使用 Powershell 7.3.3,预测智能感知功能默认处于启用状态,除非我每次使用时手动将其关闭。有什么方法可以永久关闭(或重新打开)它而无需每次都进行设置?

Joh*_*ohn 5

您可以关闭智能感知功能。

智能感知

启用预测 IntelliSense:

您可以使用 PSReadline 的选项 cmdlet 启用预测 IntelliSense 功能。

Set-PSReadlineOption -PredictionSource 历史记录

要禁用该功能,请将源设置回无。

Set-PSReadlineOption -PredictionSource 无

[设置前以管理员身份启动Powershell。以上是针对Powershell 7的。Powershell 6在设置上似乎有很大不同。]