7 ms·
I haven't met a single person who likes PowerShell. It's perhaps the textbook example of ugly design that looks technically consistent but utterly unfriendly an
by telltruth 9y ago
I haven't met a single person who likes PowerShell. It's perhaps the textbook example of ugly design that looks technically consistent but utterly unfriendly and mind bogglingly verbose. I am not saying Windows command line is great or bash is best, but at least those things are designed for humans at certain extent. I have written few ps scripts and virtually every line, every step, every task almost always required googling. I don't know anything about Snover but my image of PowerShell designer was someone who couldn't write more sophisticated parser and compensated that lack of skills and creativity to solve fundamental challenges in designing OO shell by offloading complexity and unfriendlyness on users. Basically just reverse of Steve Jobs.
It was aweful when PowerShell team tried to shove their ugly creation down people's throats by removing Shift+right click menu for "Command prompt here" by "PowerShell here". Not a sign of good product when you have to force it upon people. The designers of this thing should have been demoted, let alone making them "Distinguished Engineer".
- shyn3 9y agoI just wrote a 200 line DSC config that eliminated 90% of my job.
- tonyedgecombe 9y agoHow recursive.
- albertgoeswoof 9y agoI have met plenty of developers that love PS and significantly prefer it to bash. Generally .net people that struggle outside of visual studio
- maxxxxx 9y agoI have tried PowerShell a few time and every time I hated it. I know people who like it though. I am doing a lot scripting now with CSScript. It's much nicer than PowerShell. The main advantage of PowerShell is interop with .NET so why not use C#?
- teh_klev 9y ago> so why not use C# Because you need to compile your C# source first. With PowerShell you just write and run. Also in a PowerShell shell you can fart about and test stuff without actually having to write a fully working script in a file, i.e. it's got its own REPL.
- maxxxxx 9y agoWith CSScript you don't have to compile first. It runs as a script.
- teh_klev 9y agoYes, I know, I was addressing your question and explaining why: > The main advantage of PowerShell is interop with .NET so why not use C#? Anyhow, I've written tens of thousands of lines of CScript and PowerShell over the past 15-20 years, give me PowerShell any day of the week for automation and admin tasks. Why anyone would persist with CScript/WSH for sysadmin tasks and automation (unless you're still managing an ancient fleet of Windows 2003/2000/NT) makes my mind boggle. Also you there's a reasonably useful IDE with ships with PowerShell so you can actually set breakpoints, step through your code and inspect variables (though I prefer to use PowerGUI). That alone is a massive productivity booster.
- Nerada 9y ago>I have written few ps scripts and virtually every line, every step, every task almost always required googling. In what way? I use PowerShell daily and hardly ever have to Google [things that I've used more than once]. I imagine if I picked up another language, I'd be Googling furiously, but that shouldn't disqualify the language.
- DataWorker 9y agoI find this hard to believe unless your use is limited to "dir this" and "ping that". Powershell is like a gas station men's room in the middle of nowhere. It's better than nothing but nothing to celebrate.
- ZenoArrow 9y agoPowerShell has a few rough edges, but once you get over those it's super easy. Even when you can't remember the exact syntax for a command, the built-in help makes it quick to look up. What tool(s) have you tried using to write PowerShell scripts?
- gruez 9y ago>I find this hard to believe unless your use is limited to "dir this" and "ping that". as opposed to bash/posix with its confusingly named utilities? want to rename something? it's mv want to tell the time? it's date why is the command to download something curl/wget? what's the difference between if [[ stuff ]] and if [ stuff ] anyways? the list goes on. and no, man pages don't help if you don't even know which command to look for. at least powershell has a somewhat consistent naming convention for its commands (verb-something) so you can at least sort of guess what the command is.
- flukus 9y ago> want to rename something? it's mv There is a rename command as well. But apart from the first time I tried to rename a file I've never had trouble remembering it. There is a good reason for it to, internally it is a move operation. > want to tell the time? it's date Is this different in powershell? Some quick googling indicates the Get-Date is the method you want and being .net based everything deals with DateTime objects. > why is the command to download something curl/wget? I find this easier to remember than Invoke-WebRequest, or is it Invoke-RestMethod? If they were so hard to remember that could be aliased to something similar, but I've never seen anyone bother. Edit - I mean I've never heard anyone going the other way and suggest doing "alias Invoke-WebRequest=\"curl\"" in bash.
- flukus 9y agoPowershell has some good ideas, they just didn't come together as a whole. The idea of piping objects rather than lines of text might be good (I'm not convinced in either direction there) and probably much more efficient, but it's integration with .net hurt it. .Net code is just way to close to the "enterprise" spectrum of languages and way to terse for a shell. The powershell language itself inherits this lack of terseness. When it launched there also wasn't a whole lot you could do with it, windows wasn't built to be automated by scripts like this. This hurt the uptake right of the bat and it never really reached that critical mass to become adopted. A decade after powershells creation I still write batch files for windows specific things and stick to cygwin/bash for everything else. It's not even a familiarity thing, I learned (or at least tried to) powershell before I (properly) learned to use bash. MS would have been better off creating language/environment independent binaries to manipulate windows. > Not a sign of good product when you have to force it upon people. This sums it up nicely, the only reason PS has any use whatsoever is because it has the MS name attached.
- mattmanser 9y agoBut it's hard to understand what you're saying as .Net's not a language, which one are you talking about? I feel like I should stick up for C# as it's probably one of the best languages available today. I'm biased as I prefer statically typed languages so none of my brain is taken up by utterly useless information like having to remember the names of properties, methods, method signatures, etc. which the computer should bloody well tell me.
- e12e 9y agoIt might not be a language, but the .net object model/environment brings about as much joy to powershell scripting as the browser document object model brings to javascript...
- katastic 9y agoWhile I'm sure that's partly sampling bias. The truth is, Powershell has a lot of flaws. Both in the program itself, as well a the language decisions. And I _REALLY_ like the idea of an object-oriented piping system. I would love to have that built into Linux/bash/etc instead of every program having to have some sort of "human readable" mode and (if you're lucky) a "machine readable" mode. Except every machine readable mode is different and still requires a parsing pass to get it filtered into your program correctly. I find it fun and even relaxing to design parsing passes to bring say, smem, into a Python script. But that's because (Thank God) I don't have to do it for a living. [And the newest era of "some" programs supporting JSON or XML output but there's still no easy tools for filtering through it into the next program--requiring yet another translation layer.] Now back to Powershell. It's fun to learn the first day. And then after that, it's just an 80 degree walk uphill after you learn one stupid idea after another. You want to do something insanely simple in concept and you're pouring through ours of documentation and examples for the exact use-case. Personally, I've started using Python2/3 for scripts lately. Most systems I use already have Python, and Python is easily 10x-100x faster in many situations and that's not even using a compiled variant. And while I enjoy C variant programming, Python is still a huge step up from all those stupid Bash idiosyncrasies like string -eq non-string but wait, you added a space before the equals, so it explodes anyway. (I can't remember a great example off-the-top-of-my-head, but anyone who has used Bash has had those days of an obscure error being related to a single incorrect whitespace.)
- user5994461 9y ago>>> And I _REALLY_ like the idea of an object-oriented piping system. I would love to have that built into Linux/bash/etc instead of every program having to have some sort of "human readable" mode and (if you're lucky) a "machine readable" mode. That's sort of what ansible/salt do. Provide the most useful system commands with structured arguments as input and output, instead of crazy text everywhere.
- int_19h 9y agoObject-oriented piping is actually somewhat problematic, because objects carry behavior, not just data. This means that everyone in the pipeline now has to agree on the semantics of that behavior - in case of PowerShell, they need to understand and talk the .NET object model, for example. A much more lightweight approach is to exchange structured data. This can even be easily done on top of existing byte streams, just standardizing the format. FreeBSD started adopting this approach via libxo for its base utilities: https://github.com/Juniper/libxo https://github.com/Juniper/libxo. I hope it spreads into Linux.
- deleted 9y ago[deleted]
- SBArbeit 9y agoNow that I'm a PowerShell expert, the idea of dropping down to a *nix shell that only knows how to pass text around is appalling. Like, "the 1970's called, they want their shell back" kind-of appalling. And so what if it's a few extra characters to script stuff in it? I can make aliases for whatever I want, there's tab-completion for everything, everything is self-discoverable, there's Get-Help and Get-Command (alias gcm) to find everything that's available to me, and, by the way, it's all just a language projection on top of .NET... it's all great. It's like any other language... until you bite the bullet and really learn it, you don't know. And the idea that Windows isn't built for scripting is from the 1990's. For the last 15 years, there's (almost) nothing that Microsoft ships that can't be automated/scripted/controlled from a command-line.
- metaobject 9y agoMaybe it's just me, but the capitalization of the commands is really annoying.
- lottin 9y agoC is from the 1970's. Lisp from the 1950's. Just because something is old it doesn't mean it's bad. And likewise, new doesn't imply better.
- pjmlp 9y agoNow you know one, I love it and prefer using it to any UNIX standard shell.
- oblio 9y agoThings will become interesting in the near future as Powershell 6, which is cross platform, is released and becomes available on Linux distros.
- sqldba 9y agoI've written hundreds of thousands of lines of PowerShell. I love it.
- abrookewood 9y agoReally? I'm guessing you haven't spoken to many people who are proficient in it. I'm certainly not, but I can still appreciate the fact that you are working with Objects instead of text blobs, you have access to a decent IDE and a great help doc system.
- nunez 9y agoI love PowerShell! Used it daily as a Windows sysadmin for many years. Wrote thousands of lines in it and wrote several blog posts on it. It's an extremely flexible language that's fairly readable.
- eighthnate 9y ago> I haven't met a single person who likes PowerShell. The only thing I like about it is it's object oriented nature. That everything is an object ( PSObject ) that can be piped is very nice. However, the shell itself is slow, ugly and cumbersome. I just don't understand why windows can't create a shell like bash. The old cmd shell was horrible. PowerShell is a step up but it's still lightyears behind all the terminals we have in linux/bsd/etc. > mind bogglingly verbose. It's verbose if you don't use the aliases. But I don't mind the verbosity as you can understand the command just from the name. I like the idea of powershell ( OO, Verb-Noun commands, etc ). But the execution has been disappointing.