我在Windows 10上遇到PowerShell问题。 当我按驱动器号或Set-Location更改驱动器时,我得到一个“>>”随机提示。
这在Windows 7上从未发生过。
答案 0 :(得分:1)
尝试运行以下代码:
(Get-Command Prompt).Definition
这应该返回
"PS $($executionContext.SessionState.Path.CurrentLocation)$('>' * ($nestedPromptLevel + 1)) ";
如果没有,请用自己的定义覆盖此功能:
Function Prompt {
"PS $($executionContext.SessionState.Path.CurrentLocation)$('>' * ($nestedPromptLevel + 1)) ";
}