March 27, 2017

persistent powershell commandline history

PowerShell

Persistent PowerShell CommandLine History

via https://github.com/lzybkr/PSReadLine (& https://technet.microsoft.com/en-us/library/bb613488(v=vs.85).aspx)

TL;DR :
Win10 install module:
Install-Module PSReadline

edit* system’s powershell profile:
notepad c:\windows\system32\WindowsPowerShell\v1.0\profile.ps1

to the end of the file, add:
Import-Module PSReadline

restart powershell

*(never use notepad, use https://www.sublimetext.com/ + https://packagecontrol.io/ instead)

  

3 comments:

  1. Replies
    1. Sorry your comments were awaiting moderation...
      It worked for me; Sorry it failed for you.
      Maybe follow the original links.

      Delete

Comments, Suggestions or "Thank you's" Invited! If you have used this info in any way, please comment below and link/link-back to your project (if applicable). Please Share.
I accept Bitcoin tips of ANY amount to: 1GS3XWJCTWU7fnM4vfzerrVAxmnMFnhysL
I accept Litecoin tips of ANY amount to: LTBvVxRdv2Lz9T41UzqNrAVVNw4wz3kKYk