标签: 历史记录
2 个内容
笔记(2)
PowerShell 5及以上版本可将命令历史记录保存至本地文件。通过`Get-Content (Get-PSReadlineOption).HistorySavePath` 或 `type %APPDATA%\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt` 命令,用户能够直接读取并查看历史命令,便于回顾和复用。
Elliot Yang·
368 浏览
2 个内容
PowerShell 5及以上版本可将命令历史记录保存至本地文件。通过`Get-Content (Get-PSReadlineOption).HistorySavePath` 或 `type %APPDATA%\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt` 命令,用户能够直接读取并查看历史命令,便于回顾和复用。