PowerTip: Eliminate Duplicates in PowerShell History

Doctor Scripto

Summary: Use an option in the PSReadLine module to control Windows PowerShell 5.0 history duplication.

Hey, Scripting Guy! Question How can I make sure that there are no duplicates in my history?

Hey, Scripting Guy! Answer In Windows PowerShell 5.0 with the PSReadLineModule loaded, use the Set-PSReadLineOption 
           cmdlet as follows:

Set-PSReadLineOption –HistoryNoDuplicates:$True

0 comments

Discussion is closed.

Feedback usabilla icon