🚮
PowerShellのコマンド履歴を削除する方法
回答
> rm (Get-PSReadlineOption).HistorySavePath
PowerShellを再起動すると履歴が消えています。
メモ
以下も実行する例が散見されますが不要です。
> Clear-History
ちなみに、
(Get-PSReadlineOption).HistorySavePath
はデフォルトで
$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_History.txt
です。
Discussion