Hacker News new | ask | show | jobs
by itaysk 3666 days ago
Agree about Windows command prompt being lame compared to bash, but I really find PowerShell amazing, even more so then bash. If you look at all the recent (even not so recent) products from MS, it is clear that PowerShell is the shell for Windows, and not batch. I didn't get the cure for polio analogy that's in the article but I really think anyone that's comparing shells should compare with PowerShell.
3 comments

The worse thing about PowersHell is its syntax and OOP-ifying of everything, even if it doesn't really need to be. The naming and general syntax reminds me of this:

http://steve-yegge.blogspot.ca/2006/03/execution-in-kingdom-...

I don't deny that it is much more powerful than cmd, but it feels a lot like "emacs rather than vi" in its design, and I much prefer the latter (which would be more (ba)sh-like.)

Powershell the language is ok, Powershell the interactive shell is still lacking. Here's what I still need:

* usable tab-completion: scrolling through all available cmdlets is a poor substitute, and usually increases my keypresses instead of decreasing it.

* workable history editing: if I edit a previous command, I must remember to never use tab completion again, because pressing <tab> halfway in a command erases everything following the cursor

* consistent interface: In a powershell shell window, I can use left mouse button to select and copy, right mouse button to paste. In command shell window, I must use right mouse button to select "Mark" in context menu before even left-mouse selection works. In powershell ISE, left mouse button selects but does not copy, right mouse button still opens a context menu.

I use PowerShell ISE 99% of the time I write PS, so I don't experience any of these.. but valid suggestions, should go on the PS \ commandline uservoice.
You're on Hacker News. Most people who say they hate powershell have done so little posh they don't even know 'select' or 'where'.
Nobody starts using posh just because some new cool thing in the shiny new OS.

My first impression of it? It went like this:

Task: you need to connect to Hyper-V VM console via Remote Desktop.

Hiccup: for that, you need to know it's GUID. How to find it out? Just run this handy posh script... (https://blogs.msdn.microsoft.com/virtual_pc_guy/2014/11/25/u...)

Another hiccup: That script does not work, it needs some library that's not loaded by default. Try to find out how.

Another hiccup: It does not load, because it breaks some policy, that's off by default. Investigate, what to do.

How it ended: forget it, I have better things to do than solve problems with Powershell. Look into VM files and find out, that it's one of the GUIDs there.

Result: Won't touch posh again and anyone singing about its virtues is getting promptly ignored.

Maybe it's not fair to Powershell, but the first impression counts.

Totally agreed the default policy thing (you can't run scripts until you allow it) can be a nasty shock, especially to folk (like me and everyone else here) coming from Unix.

OTOH, you'll spend way less time scraping stuff for regexs and actually just asking posh for fields. It's really, really worth learning.

Select-Object or Select-String?
'select-object' - 'select' is it's default alias.