Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.os.windows-11 > #18221
| From | Paul <nospam@needed.invalid> |
|---|---|
| Newsgroups | alt.comp.os.windows-11 |
| Subject | Re: Powershell coolness - persistent history |
| Date | 2025-04-03 05:12 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <vslje4$9i3h$1@dont-email.me> (permalink) |
| References | <349sujhep1jq6869irrt9hmb2l8oh0kpho@4ax.com> |
On Thu, 4/3/2025 2:28 AM, Char Jackson wrote: > 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. > You can use the up-arrow key and work back through the history buffer. Powershell also has tab-completion, if you type part of a command name, then tab tab tab, it will show you all the things you could finish up with that spell like that. These are patterns that are copied on purpose, from previous environments. They are like "comfort food" for the user. Paul
Back to alt.comp.os.windows-11 | Previous | Next — Previous in thread | 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