powershell-history
Powershell history file common location
cmd /c C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txtConfirm powershell history save file
powershell -c "(Get-PSReadLineOption).HistorySavePath"Read powershell history file
powershell -c "gc (Get-PSReadLineOption).HistorySavePath"Print out the content of powershell history
foreach($user in ((ls C:\users).fullname)){cat "$user\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt" -ErrorAction SilentlyContinue}Last updated