Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.os.windows-11 > #18215
| From | Char Jackson <none@none.invalid> |
|---|---|
| Newsgroups | alt.comp.os.windows-11 |
| Subject | Powershell coolness - persistent history |
| Message-ID | <349sujhep1jq6869irrt9hmb2l8oh0kpho@4ax.com> (permalink) |
| Organization | Newshosting.com - Highest quality at a great price! www.newshosting.com |
| Date | 2025-04-03 01:28 -0500 |
I very rarely use powershell and I'm not overly familiar with it, but today I wanted to run a command that I knew I had run several months ago. I couldn't remember the syntax, but it turns out that powershell keeps a record of every command I've ever used. To retrieve the PS command history and display it in Notepad: Notepad (Get-PSReadLineOption).HistorySavePath To find the history file: (Get-PSReadLineOption).HistorySavePath or in File Explorer's location bar: %APPDATA%\Microsoft\Windows\PowerShell\PSReadLine\ %APPDATA%\Microsoft\Windows\PowerShell\PSReadLine\*_history.txt Mine is in: C:\Users\[user]\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt Probably old news to most folks here, but new news to me.
Back to alt.comp.os.windows-11 | Previous | Next — Next in thread | Find similar | Unroll thread
Powershell coolness - persistent history Char Jackson <none@none.invalid> - 2025-04-03 01:28 -0500
Re: Powershell coolness - persistent history Paul <nospam@needed.invalid> - 2025-04-03 05:12 -0400
Re: Powershell coolness - persistent history Andy Burns <usenet@andyburns.uk> - 2025-04-03 10:31 +0100
Re: Powershell coolness - persistent history Char Jackson <none@none.invalid> - 2025-04-03 10:51 -0500
Re: Powershell coolness - persistent history VanguardLH <V@nguard.LH> - 2025-04-03 05:40 -0500
Re: Powershell coolness - persistent history Andy Burns <usenet@andyburns.uk> - 2025-04-03 12:44 +0100
csiph-web