How to save and load history in powershell PSReadLine module?

2.1k views Asked by At

I'm using great PSReadLine module for Powershell and I really like that is persist my history of commands. But I need to reinstall my system. What is the easiest way to save this history (probably to file) an load it after fresh install of PSReadLine?

1

There are 1 answers

0
user4003407 On BEST ANSWER

PSReadline module save command history in file. All you need is to backup that file and restore it after reinstalling your system. You can get file name of history file by following command:

(Get-PSReadlineOption).HistorySavePath