PowerShell: Clear Command History 🚀
Clear Shell Command History
put this in your PowerShell Profile
function xah-clear-history { # .DESCRIPTION # clear PowerShell command history # ~/AppData/Roaming/Microsoft/Windows/PowerShell/PSReadLine/ConsoleHost_history.txt # Version 2022-01-31 Set-Content (Get-PSReadLineOption).HistorySavePath -Value ""; }