5

I have been running the same Windows setup for too long. It has become slow and I believe putting a new setup from scratch would help.

The one thing that stops me from doing that is PowerShell's CTRL+R history, which I use extensively.

How do I export, and then import this history file after re-installing Windows?

1 Answer 1

6

PSReadline stores the console history in this file:

%APPDATA%\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt

Copying that file across installations will bring over the history. The directory structure might not exist in the new installation at first, so after reinstalling, you should open a PowerShell prompt, run any command (thereby making PSReadline create the structure), close the prompt, and then paste the file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .