--- tags: - 🚩purpose/ℹ️documentation - 🏷️topic/⌗shell/powershell --- 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. #📑context/🎯todo