Hi stranger! Have you claimed your tini.bio yet?
@ryan-adams
posts
#713
Share
Login
Ryan A.
Mar 7
How To See The Command History (CMD, PowerShell) Across All PowerShell Sessions
Open PowerShell (Press Win + X and select "Windows PowerShell" or "Windows PowerShell (Admin)" if needed).
Run the command to check where your history file is stored:
cat (Get-PSReadlineOption).HistorySavePath
This command will display the file path where your history is saved. The command uses PSReadline to retrieve the history save path and then cat (which is an alias for Get-Content) to display the content of the history file.
Explanation:
Get-PSReadlineOption: Retrieves options from the PSReadline module.
.HistorySavePath: This property returns the file path of where command history is stored.
cat: This is shorthand for Get-Content, which displays the file’s content (the saved command history).
0
↗ X
↗ LinkedIn
Follow my journey
Get my latest posts and updates. Join the Tini community.
Sign up to follow @ryan-adams
Claim your tini.bio →