隐藏 PowerShell 欢迎页/开头标语/欢迎信息
打开 Windows Terminal 添加参数 -nologo
"C:\Program Files\PowerShell\7\pwsh.exe" -nologo获取历史补全文件
Get-ChildItem $env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine ❯ Get-ChildItem $env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine Directory: C:\Users\你的用户名\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2024/9/13 23:45 22627 ConsoleHost_history.txt打开C:\Users\你的用户名\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
删除你不想要的历史记录。