3 ms·
I've never met anyone that tried to do some scripting with PowerShell and didn't fall in love with it, that's why I find it difficult to believe that you hate
by NetStrikeForce 11y ago
I've never met anyone that tried to do some scripting with PowerShell and didn't fall in love with it, that's why I find it difficult to believe that you hate it. Or that you tried it.
You might hate the terminal where PowerShell runs, but I don't think you hate Powershell.
I see a future where devs move to Windows due to Bash and stay due to PowerShell.
- illumin8 11y agoI've done some terrible, terrible automation using PowerShell and PS Remoting across dozens of Windows servers, and wanted to smash my screen on multiple occasions. First, PS Remoting is terrible compared to SSH. Commands fail randomly on a small percentage of systems, and the only options to troubleshoot are to login manually to the remote system, and try a number of things, including rebooting the remote system (not very good for servers). Second, debugging is terrible compared to bash - sure PowerShell ISE allows you to step through your code line by line, however, I don't have anything like "bash -x script.sh" which lets me see the actual execution and return code of every line of my scripts. Third, bash has a much simpler way to chain output through multiple programs using pipes and treating input/output as simple text. PowerShell is a pseudo programming language with objects and other data types that just don't enable this type of chaining in the same simple and easily understandable way. It took me weeks to write a PowerShell script that used PS Remoting to loop through a list of provided servers, install a service, set the RunAs user, start the service, create a secret file, and EFS encrypt that file as a specific user. I could have written the same script in hours using bash for Linux boxes. It would have been much more efficient by using tools like GNU parallel. I'm not sure how anyone that's used both PowerShell and bash for any serious work could say PowerShell is better, unless they're a .NET developer and appreciate being able to blend .NET objects into their scripts, but to me, that just breaks the simple modular composability of the *nix philosphy.
- NetStrikeForce 11y agoWe might have very different use cases I guess. I script a lot to work with data, not to automate things. I feel very comfortable getting a stream of data and treating it with sed, awk, grep and whatever; but once I worked with objects it feels much more data-oriented. And please don't get me wrong, I've been in love with Bash since a Slackware CD fell on my hands in the 90s. I just was mind-blown by PS after making fun of it for years - just because the default terminal where it runs is less than great. I guess this thread proves the point of bringing Bash to Windows: Different people, different uses, different needs and solution. And that makes me happy :)
- tripzilch 11y agoso is there a better terminal available for PowerShell? (preferably for win7, because I run Linux at home and win7 is the most likely platform I may spend some time elsewhere) I do appreciate, from all I've heard about PowerShell, it might be an interesting environment to try some scripting in. The actual shell/programming language can't be (much) worse than bash--I mean let's admit, bash is pretty ancient and therefore didn't have the advantages of progress in designing programming languages we have made in the past decade(s).
- NetStrikeForce 11y agoThe terminal is inferior IMHO, but the language is far superior. Of course, if you're too used to Bash and its paradigm there's a learning curve in PowerShell. Not steep, though :-) The killer features for me are the objects and being able to seamlessly use C# libraries in my scripts.
- gpvos 11y agoI wrote a few 10- to 20-line scripts, but got lost in the documentation every time. You have to wade through mud to get anything simple done. Statements/command lines easily wrap around an 80-character window due to their verbosity. The worst is that every command has about 40+ options, most but not all of them the same as for other commands. Sorry, not for me.
- koide 11y agoPowershell is so foreign with its typed pipes to those of us who are accustomed to the string based pipes that I have a very hard time falling in love with it.