Skip to main content
2 of 2
added 88 characters in body
user364455
  • 3k
  • 2
  • 14
  • 15

PowerShell in Windows 10 use PSReadline for better command line editing experience. PSReadline does not use normal console input buffer and so not affected by Discard Old Duplicates option. You should disable duplicates in PSReadline options:

Set-PSReadlineOption -HistoryNoDuplicates

You have to put that in your PowerShell profile, if you want this as default behavior.

user364455
  • 3k
  • 2
  • 14
  • 15