PowerShell v5 session history
Session history (with e.g. Get-History
) is separately handled from PSReadLine
history, accessed with arrow keys. PSReadLine
history is saved here and seems to never be emptied:
%userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt
PSReadLine
history can be retrieved using:
[Microsoft.PowerShell.PSConsoleReadLine]::GetHistoryItems()
Curious where this is under Core on Linux. 📑context/🎯todo