githubEdit

powershell-history

Powershell history file common location

cmd /c C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt

Confirm powershell history save file

powershell -c "(Get-PSReadLineOption).HistorySavePath"

Read powershell history file

powershell -c "gc (Get-PSReadLineOption).HistorySavePath"
foreach($user in ((ls C:\users).fullname)){cat "$user\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt" -ErrorAction SilentlyContinue}

Last updated