Windows/DOS has had a *bad* command shell for a long time…but that is about to change with the October 22nd release of Windows 7.
Windows 7 ships with PowerShell 2.0…and it is *really* good.
PowerShell 2.0 features:
- Unlimited output buffer (command prompt had 300 lines by default, and a max of 9999)
- Easy text selection (command prompt could only do “screen space” selection, which made selecting multi-line text virtually impossible…no more!)
- Aliases for standard Unix shell commands (pwd, cp, man, rm, rmdir, mv, ls, cat, grep, ps, kill, tee, clear)
- Aliases for standard cmd.exe commands (cd, cls, copy, help, del, rmdir, rename, dir, type, find, findstr, tlist)
- Support for paths with either forward or backward slashes
- Support for network resources *without* mapping a drive (i.e. can do this: cd \\share\mypics)
- All commands follow a consistent verb-noun naming convention (get-childitem, write-output, etc.) which makes the commands self descriptive and easy to learn
- Can use standard file system commands (cd, dir, rm, cp, etc.) on…
- The Registry
- Environment Variables
- User supplied custom data
- Command and parameter tab completion
- Really good documentation, with examples via get-help (or help/man)
- Script debugger with support for breakpoints, stepping, call stack, and hover over variables to see values
- Commands are chained together via *objects* instead of text. Nice example of this powerful feature here.
- Can output your results in rich text format to out-gridview. I *love* this feature. Read about it here.
- Supported on Linux/Mac via Pash
Here is a nice table that compares all the different shells and their features. PowerShell comes out as the most advanced shell.
Windows 7 marks the first time Windows has had a better default shell than Linux or Mac.
Other Linux advantages that are no more with Windows 7: