Monday, 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)

No comments:

Post a Comment

Comments, Suggestions or "Thank you's" Invited!