Well, your first problem is that you are comparing a shell (PowerShell) to a terminal. In Linux, a terminal is something that sends and receives character-based I/O and is assumed to have an interactive user behind it (in other words, it's the GUI application used to contain a shell). One of the most common shells run within Ubuntu's Terminal is Bash, but there are others.
People offline tell me, without explaining much, that Windows PowerShell is an attempt to make Unix administrators feel more comfortable using Windows.
Really, the correct thing to say is that PowerShell is Windows exposing much of the WMI, COM and .NET object model in an interactive and scriptable command line environment - and that this command line environment continues to borrow many of the concepts - such as pipelines and I/O redirection - from Unix shells, just like the old DOS (2.0 and up) command.com
and cmd.exe
did. Pipelines work with objects in PowerShell. You can do things like create HTML and possibly Excel spreadsheets on the fly if you knew enough. It's certainly an upgrade/replacement from the old cmd.exe
shell which hasn't changed much from Windows NT 4.0.
Regarding the syntax, it's less like the Unix shells (although finally none of the cmdlets use /
as a switch or parameter indicator), but there are many aliases to classic Unix commands - such as entering ls
in a PowerShell window will work like dir
. But these are just aliases ("Get-Alias" lists these?).
Regarding the capability of PowerShell, you really had similar capability, in a scripted-only fashion, from VBScript and CScript - though both of these predate .NET.
One thing Unix people do not have to do when using Bash most of the time is to be intimately familiar with a programmer's or object's possibly very elaborate object model, which is required for many advanced and simple PowerShell tasks. But this is only possible because there is a clear convention of straight text output for many standard POSIX commands. Windows has not had this tradition - it has seemed to prefer you use an mmc
console for adminstration tasks, with commands added here and there over the years. Furthermore, many well-known Unix utilities are complex and require some study before use - rsync
, wget
, and many others. Efficiency is probably a function of how well one knows the tool they are using more than anything else.
1I am a longtime Unix fanboy who prefers Unix to Windows in most respects; however, PowerShell beats bash hands down because one pipes objects having key/value pairs and not pure text. This makes it more similar in design to jQuery than to bash. – Mario – 2014-12-19T17:11:32.960
3That's hard to answer, because there is not THAT Linux shell. There are many shells commonly used on Linux (or generally *nix systems). The most used one is bash, so you may want to ask about that.<br> Also "powerful" is very opinion based. – Kritzefitz – 2014-01-26T17:02:02.270
8
People offline tell me ... that Windows Powershell is an attempt to make UNIX administrators feel more comfortable using Windows.
Those people have neither used Unix or Powershell. – surfasb – 2014-01-26T17:23:41.980I'd say that PowerShell is an acknowledgement from some areas of Microsoft that they messed up by not having a powerful shell available. It does not at all copy the style of UNIX however. To know PS, you really do well to understand a bit about how Windows works and how .NET works. – Julian Knight – 2014-01-26T18:08:29.587
BTW, Microsoft did have a BASH shell available that was part of a migration toolkit supposed to help people move from UNIX to Windows Server. – Julian Knight – 2014-01-26T18:09:17.043