Windows 10のPowerShell version 5.0では、PowerShellの入力履歴はデフォルトで以下のファイルに保存される:
C:\Users\[username]\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
ConsoleHost_history.txt
にはユーザーがPowerShellターミナルを起動して対話モードで入力したコマンドの履歴が保存される。PowerShellターミナルを介さずに実行されたコマンドは記録されない。
元々はPSReadLineというモジュールの機能の一部だった。
参考
https://github.com/PowerShell/PSReadLine
https://docs.microsoft.com/en-us/powershell/module/psreadline/get-psreadlineoption?view=powershell-7