locked
Powershell commands history Windows 10 1809 (PSReadLine) RRS feed

  • Question

  • Hi all,

    I wish you a HNY, healthy and full of happiness !

    Since I upgraded my 2 Windows 10 workstations on 1809, I've lost the history and coloration of Powershell commands.

    I know this is a known PSReadLine related issue with keyboard layouts other than EN, but I did not find THE solution to solve it.

    Should you have an idea ?

    Thanks.

    Regards,


    FXE

    Thursday, January 10, 2019 4:51 PM

Answers

  • Hi,

    Thanks for your question.

    By default, the PowerShell in Windows 10 saves the last 4096 commands that are stored in a plain text file located in the profile of each user %userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt. The history is stored separately for PowerShell and ISE.

    You can check the text file for command history.

    You would need a new build of PSReadLine. In the question of Github, someone fixes it by installed a new build of PSReadLine. replace files in C:\Program Files\WindowsPowerShell\Modules\PSReadline\2.0.0.

    Please refer the link below:

    https://github.com/lzybkr/PSReadLine/issues/614

    Best Regards,

    Lee


    Just do it.

    • Marked as answer by FXE Friday, January 18, 2019 8:19 AM
    Monday, January 14, 2019 7:44 AM

All replies

  • Please elaborate your issue.

    Are you referring to Get-History command?

    How did you perform this action in previous build?

    Thursday, January 10, 2019 7:25 PM
  • Since 1809 upgrade, I've no history when I press up arrow key, and I've no coloration (yellow and others) on my commands.

    FXE

    Friday, January 11, 2019 12:53 PM
  • Hi,

    Thanks for your question.

    By default, the PowerShell in Windows 10 saves the last 4096 commands that are stored in a plain text file located in the profile of each user %userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt. The history is stored separately for PowerShell and ISE.

    You can check the text file for command history.

    You would need a new build of PSReadLine. In the question of Github, someone fixes it by installed a new build of PSReadLine. replace files in C:\Program Files\WindowsPowerShell\Modules\PSReadline\2.0.0.

    Please refer the link below:

    https://github.com/lzybkr/PSReadLine/issues/614

    Best Regards,

    Lee


    Just do it.

    • Marked as answer by FXE Friday, January 18, 2019 8:19 AM
    Monday, January 14, 2019 7:44 AM
  • Hi Lee and thank you for your answer.

    What I found on your link :

    - Download he patched nightly build : https://ci.appveyor.com/project/lzybkr/PSReadLine/branch/master/artifacts

    - Replace the updated files :

    @eliohann I installed the nightly build by replacing files in C:\Program Files\WindowsPowerShell\Modules\PSReadline\2.0.0
    And now it works with my custom keyboard layout !

    Really strange this issue has not been fixed yet by MSFT...


    FXE

    Friday, January 18, 2019 8:22 AM