History

History: Set-PSReadLineOption –HistoryNoDuplicates:$True, and %AppData%\Microsoft\Windows\PowerShell\PSReadLine\.

https://www.howtogeek.com/298244/how-to-use-your-command-history-in-windows-powershell

No duplicates.

Set-PSReadLineOption –HistoryNoDuplicates:$True

(Get-PSReadlineOption).HistorySavePath.

%AppData%\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt

Editable directly.

Ctrl + R.

Reverse search.

Ctrl + S.

Forward search.

Updated: 2026 Aug 19