Take the 2-minute tour ×

I've been trying to switch over to PowerShell from my old favorite 4NT. It's missing a lot of niceties that 4NT has been adding over the last 20 years (I'm an old 4DOS user).

For example, in 4NT if you type a few letters then hit up/down, then the history list is filtered by what you typed. Page up/down does a popup with all matches and you can cursor through them. All in the console window space, no GUI. This is a big time-saver that I miss. There are many other things like this missing from powershell.exe.

Are there any alternatives to powershell.exe that perhaps have features like this, that really take advantage of the console environment? I realize there are a lot of GUI-based tools that embed PowerShell as a pane, but I'm really interested in a cmd.exe/4nt.exe replacement that stays as a 100% console application (except for maybe an options dialog or whatever).

share|improve this question

5 Answers 5

up vote 10 down vote accepted

Joshua already mentioned F7. You can also do partial history matches in Powershell.exe by typing some of the command and pressing F8 - repeat F8 to cycle through matches (see about_history). There are also a few more line editing features than folks typically know about. These are documented in the about_line_editing help topic. Still, line editing in the PowerShell console host leaves something to be desired. FWIW all of the other hosts I'm aware of are GUI based.

BTW I was a 4NT user for years (as well as Korn shell user). Even with a few missing amenities found in 4NT, I find PowerShell a much more capable shell and, as a developer, all the "language" bits are pretty easy to adapt to and use. I never really liked the Korn shell if / fi and case / esac statements - just rubbed my sense of aethestics the wrong way. :-) Plus in PowerShell you can do cool stuff with your history like:

# Search history using regex
PS> get-history -count 999 | select-string '\b(fl|ft)\b'

# Look at your shell usage pattern by hour of day - Name column is hour of day
PS> ghy | group {$_.StartExecutionTime.Hour}

Count Name       Group
   30 21         {$allargs, echoargs -arg $allArgs, echoargs $a
    2 22         {ghy | group {$_.StartExecutionTime.Hour}, ls}

# Look at commands in terms of execution time (sorted descending)
PS> ghy | Select CommandLine,Id,`
      @{n='ExecutionTime';e={$_.EndExecutionTime - $_.StartExecutionTime}} | 
      Sort ExecutionTime -Desc 

CommandLine                                        Id ExecutionTime
ls C:\Windows\System32 ...                         94 00:00:06.0233445
ls C:\Windows\System32\...                         93 00:00:01.1360650
gps | fl                                           89 00:00:00.5780330
dir                                                80 00:00:00.0950054
ls                                                 83 00:00:00.0870050
ghy | Select CommandLin...                         92 00:00:00.0810046
dir                                                67 00:00:00.0750042
ghy | Select CommandLin...                         95 00:00:00.0580034
ghy | Select CommandLin...                         96 00:00:00.0570032
ghy | Select CommandLin...                         97 00:00:00.0540031
dir                                                76 00:00:00.0500029
get-history -count 999 ...                         88 00:00:00.0420024
share|improve this answer
This is my third try to move over from 4NT and I'm going to make it stick this time. Good to know about F7/F8, thanks! Now if only ctrl-v had an equivalent shortcut so I don't have to reach for the mouse.. Perhaps autohotkey can help me fill in the gaps. –  scobi Jan 26 '10 at 1:45
For paste, try Alt+Space,E,P - cheesy but it works. –  Keith Hill Jan 26 '10 at 4:19
Revisiting this old thread.. I run Powershell through Console2 [sourceforge.net/projects/console/] and that provides cut/copy/paste functionality (among many other things). –  scobi Nov 18 '11 at 22:17

Check out PowerTab. It is a great (and free) add-on that gives you some really nice tab-completion features.


PowerTab has a new host.

share|improve this answer
New version, new features, new hosting. powertab.codeplex.com –  JasonMArcher Mar 3 '11 at 19:52

It is also possible to tab through your command history by using #.

One of the disadvantages of using F8 is that it is case sensitive and it only matches the beginning of a command. Using #<partial match><tab> is case insensitive and will match text at any position in the previous commands.

If you have the following command history:

# 1
$np = Start-Process notepad -PassThru
# 2
$np| get-process
# 3
$np| Stop-Process

Typing #pr then tab repeatedly will cycle through 1, 2 and 3.

Typing #st then tab repeatedly will cycle through 1 and 3.

Using only # will match all history.

# can also be used after entering part of a command. If your history is:

select *

You can type Get-Process #n<tab>| #s<tab> to get Get-Process 'notepad'| select *

share|improve this answer
Yeh, it's strange about the case-sensitivity of f8. The PS team worked really hard to make all the stuff that is usually case sensitive not so, and yet they missed this. Really seems like a mistake. –  Elroy Flynn Jan 12 '12 at 17:21
@ElroyFlynn - F8 is a function of the Windows console, not PowerShell (you can use it from cmd.exe as well). The PS team had no control over it since the F8 console function existed before PowerShell existed. –  Rynant Jan 12 '12 at 17:55

Hey, you have the same history as me. I'm an old 4dos/4nt user too. I'm not a fan of the new fangled hosts that completely replace the console subsystem for input and that's why I like PowerShell Plus - at its core it's still the NT console but has many modern graphical features that can be pared back as desired.


There's a 30 day trial available and the author Tobias Weltner is very responsive to help requests/suggestions.


share|improve this answer
Hey Oisin, I didn't know it used the console subsystem - cool. Guess all the fancy GUI windows threw me off. :-) –  Keith Hill Jan 25 '10 at 17:20

Powershell is still pretty new, so look for someone to implement some of these. For now, though, you can hit F7 to get a command history and select from that. The tab completion stuff in powershell is pretty powerful, too, and you can use wildcards to do command tab completion (even on partial cmdlet names).

share|improve this answer

Your Answer


