Live data from Hacker News

PowerShell vs. Unix shells

stackoverflow.com

31–40 of 84 posts

Re: PowerShell vs. Unix shells

#31
post #8

The main difference between the two, in my humble opinion, is that PowerShell is a nice (and powerful) addition to a Windows system, whereas the Shell is a fundamental component of Unix. Of course, the two shells may be equivalent in terms of power or number of features, and any contest a la "Can your shell do this?" would be futile. To me, it's a matter of cultural differences. Think of it this way: a shell operates…

> PowerShell is still treated as a second class citizen in the Windows eco-system

This is so completely wrong it's not funny. The majority of Microsoft's server GUIs are now built completely on PowerShell. This includes basic products like IIS, Exchange, etc. Where I work, most consultants who implement or maintain these products have learned PowerShell and use it regularly. Windows Server 2012's default option is "headless" install (Powershell only), and that's been an option since at least Server 08 R2. Powershell is certainly not an afterthought - it is at the core of Microsoft's server administration GUI plans. MS have completely committed to it.

Re: PowerShell vs. Unix shells

#32

Earlier quoted context omitted.

There is no plausible objective answer to this question, thus its not for StackOverflow. If you want to just talk about interesting topics, use a forum (so says the SO masters).

"There is no plausible objective answer to this question, thus its not for StackOverflow." The first half of that sentence is absolutely true. But judging by the enormous number of upvotes, StackOverflow itself (i.e., the people who make it up) disagrees about that second bit. I fall on the side of Stack Overflow at large. Programming is, among other things, an art. Like in any art, there are sometimes situations whe…

I don't think that's possible at all. If you'll have a listen to their recent podcast #31 - it explains how they see this.

Re: PowerShell vs. Unix shells

#33
After a few years working on a OSX machine I arrived at a new job and had to work with a windows machine. I had the idea to try Powershell so I could share scripts with my colleagues, as I always done. One year later I am still using it, no one ever had any interested on learning them (but they always ask me to run that "dark magic script that load that excel spreadsheet").

Even if my primary goal was not achieved I am still happy that I learned a few tricks with it.

Re: PowerShell vs. Unix shells

#34
post #22
post #8

The main difference between the two, in my humble opinion, is that PowerShell is a nice (and powerful) addition to a Windows system, whereas the Shell is a fundamental component of Unix. Of course, the two shells may be equivalent in terms of power or number of features, and any contest a la "Can your shell do this?" would be futile. To me, it's a matter of cultural differences. Think of it this way: a shell operates…

> You probably heard of the famous McIlroy vs Knuth story (legend?), where a pipe of a few commands turned out to be more efficient than a Knuth data structure. Since very few shell scripts run continuously for long periods of time, it's hard to justify prioritizing runtime efficiency over development time. I remember ActiveState's Perl and the standard Windows version of Python have some API hooks that can be useful…

> As for the "can you do this" thing, I run bash on Android. Can PowerShell run on Windows Phones ;-)

Seems like you need to ask "Google" about these things ;-) http://stackoverflow.com/questions/8892357/is-there-any-scri...

To be sincere I also prefer to develop in .NET with Visual Studio than in Java. And, if you ask me about the mobile market ($$$) size, I prefer iOS than Android. I see a lot of crap on the Android Market and a lack of high quality applications.

Re: PowerShell vs. Unix shells

#35
post #34
post #22

Earlier quoted context omitted.

> You probably heard of the famous McIlroy vs Knuth story (legend?), where a pipe of a few commands turned out to be more efficient than a Knuth data structure. Since very few shell scripts run continuously for long periods of time, it's hard to justify prioritizing runtime efficiency over development time. I remember ActiveState's Perl and the standard Windows version of Python have some API hooks that can be useful…

> As for the "can you do this" thing, I run bash on Android. Can PowerShell run on Windows Phones ;-) Seems like you need to ask "Google" about these things ;-) http://stackoverflow.com/questions/8892357/is-there-any-scri... To be sincere I also prefer to develop in .NET with Visual Studio than in Java. And, if you ask me about the mobile market ($$$) size, I prefer iOS than Android. I see a lot of crap on the Androi…

It's hard to stand out within the Play app store, but the lack of competitors is actually an opportunity. And while I really hate using Java for web applications, Android is quite nice to develop for, once you get the rules and learn to navigate the boilerplate. I also find the wide selection of devices comforting when compared to the one size fits all idea (even if the one size is the one dictated by Saint Steven of Cupertino himself)

Re: PowerShell vs. Unix shells

#36
post #8

The main difference between the two, in my humble opinion, is that PowerShell is a nice (and powerful) addition to a Windows system, whereas the Shell is a fundamental component of Unix. Of course, the two shells may be equivalent in terms of power or number of features, and any contest a la "Can your shell do this?" would be futile. To me, it's a matter of cultural differences. Think of it this way: a shell operates…

> PowerShell is still treated as a second class citizen in the Windows eco-system This is so completely wrong it's not funny. The majority of Microsoft's server GUIs are now built completely on PowerShell. This includes basic products like IIS, Exchange, etc. Where I work, most consultants who implement or maintain these products have learned PowerShell and use it regularly. Windows Server 2012's default option is "h…

Interesting - babarock is incredibly wrong from the windows perspective, but from the unix perspective entirely correct. (I work in IT and handle things on both sides.)

Comparatively, the recent and steadily increasing reliance on PS is evidence of microsoft's recognition of the utility of a shell for managing their more complex software.

On the other hand, the fact that PS doesn't have it's own readline yet (it's just a wrapper for the cripplingly ancient CMD) and its incredible lack of basic features (just try managing AD users in PowerShell - sure its easy once you've written your own custom script or mapped it to a web interface or something, but there's no built in equivalent for adduser or about a billion other basic UNIX commands).

It all depends on your perspective. I'm glad to see MS moving away from their decade of GUI dependence.

Re: PowerShell vs. Unix shells

#37
post #5

PowerShell compared to Cygwin bash, in my experience: * Powershell is more capable than bash, straight up. * bash is easier to use; writing ad-hoc pipes etc. in PowerShell has never seemed pleasant to me, the commands are verbose and the contractions non-obvious; getting help is tedious, and options are often very long. * Object orientation works well when you're dealing with meaningful objects. But often you just wa…

> getting help is tedious, and options are often very long.

This is what bothered me the most when I last worked on MS systems (maybe 7 years ago now). As much as people complain about manpages, having a quick reference, with some verbosity, right at hand is immensely helpful. Maybe not knowing my way around the MS ecosystem handicapped me, but it was always so much more difficult to find a useful quick reference for what I needed in windows.

Re: PowerShell vs. Unix shells

#38

"closed as not constructive by Bobby, Kev♦ 20 mins ago" This despite 111 upvotes on the question, 249 upvotes on the accepted answer, and 43 upvotes on the HN link (0 mins ago). ---- Dear Stack Overflow Moderators, Seriously, what is it that you find to be so objectionable about interesting topics? Love, bunderbunder

They want this sort of problem on http://programmers.stackexchange.com/. It is much more clear cut than what happened to me.

See http://news.ycombinator.com/item?id=4203350 for my quitting stack overflow due to bad moderation.

Re: PowerShell vs. Unix shells

#39

Earlier quoted context omitted.

There is no plausible objective answer to this question, thus its not for StackOverflow. If you want to just talk about interesting topics, use a forum (so says the SO masters).

"There is no plausible objective answer to this question, thus its not for StackOverflow." The first half of that sentence is absolutely true. But judging by the enormous number of upvotes, StackOverflow itself (i.e., the people who make it up) disagrees about that second bit. I fall on the side of Stack Overflow at large. Programming is, among other things, an art. Like in any art, there are sometimes situations whe…

"Within PowerShell, you can call out to your Unix tools" -- so the answer, to the question "how closely does PowerShell emulate Unix scripting?", is "totally". That seems like a pretty objective and plausible answer to me.

The questioner did not ask which was _better_, but how close one is to the other, and on particular dimensions. If a question like that is too controversial or slippery to answer, then I don't see how S.O. can answer any question about choices among technologies.

I think some moderators just saw Windows vs Unix and reflexively decided a food fight must ensue. And that's just sloppy.

Re: PowerShell vs. Unix shells

#40
post #20

How much can you do with powershell regards system configuration? For example, could you put a Windows Server with PS behind SSH and login and config everything that way without having to touch the GUI?

Kind of, but you're doing it wrong. The bash way to remotely administer a server is to SSH into the server, then run your commands there. While that's technically possible with PowerShell in recent versions, it's not how PowerShell is designed to work with remote machines. Instead, your local copy of PowerShell is designed to grab the remote server's management objects, and use those to administer the remote server.…

This approach most likely requires that the script runs within the same trusted local network, correct? So, technically you'd still have to "ssh" into at least one box, and run all admin scripts from it.
Post reply on HN