--- tags: - "\U0001F4D1context/\U0001F3AFtodo" - "\U0001F6A9purpose/ℹ️documentation" - ⭐topic/⌗shell/powershell --- # PowerShell v5 session history Session history (with e.g. [`Get-History`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_history?view=powershell-7.3)) is separately handled from [`PSReadLine`](https://learn.microsoft.com/en-us/powershell/module/psreadline/about/about_psreadline?view=powershell-7.3) 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: ```powershell [Microsoft.PowerShell.PSConsoleReadLine]::GetHistoryItems() ``` Curious where this is under Core on Linux. `{_obsidian_pattern_tag_📑context/🎯todo}`