4 ms·
I have tried PowerShell a few times but I can't never appreciate it. Yes, it technical superior than it's counterparts on Linux by piping objects instead of ma
by fetbaffe 12y ago
I have tried PowerShell a few times but I can't never appreciate it.
Yes, it technical superior than it's counterparts on Linux by piping objects instead of mangling text, but the syntax of PowerShell is just too convoluted.
I have concluded that when doing command line you want to write commands and not program code to execute.
That's why bash is usually straight on and powerful for the 95% commands you do. It's edge cases when you need to do horrible awk piping and general guess work.
PowerShell feels the other way around. Easy for the 5% edge cases, but pain for the 95% common stuff.
Yes, you can create aliases in PowerShell for the most common tasks, but then you don't really learn the powerful mechanics that you need to know.
And it does not help that you need to learn one more scripting language. Microsoft should have gone for JavaScript.
Maybe I'm missing something in the greatness of PowerShell?
- ygra 12y agoMy point here was mostly that instpkg32.exe /DefaultSettings:ALL_DEFAULTS is something that doesn't really exist anymore for management tools on Windows, except those that have been around for a long time. Even the GUIs on Windows Server nowadays just drive a PowerShell runspace behind the scenes and you can script just as easily as click around. Install-Package is a PowerShell cmdlet and thus gets sane and consistent argument parsing and discovery for free. Something like instpkg32.exe simply won't exist for a new feature here. As for your complaints, I can gladly answer them and other questions, but it's probably a bit OT here.
- mattmanser 12y agoSane and consistent are two words I would never use with Powershell. Well, it's consistently insane, but I imagine that's not a typo. Or-Do-You-Enjoy-Over-Verbose-Capitals-And-Dashes-As-You-Enjoy-Shift-Ballet?
- ygra 12y agoYou do realize that PowerShell is case-insensitive (you don't need to hit Shift unless you need it for something like parentheses) and there are aliases to ease typing when you're just using the shell? (I wouldn't recommend using aliases in scripts, though.) Besides, if this is about command parameters, all that's needed is the dash and enough letters so the parameter name is unambiguous; for many common commands that's not longer than the single-letter arguments to Unix tools. And they are case-insensitive, too. No need for Shift here either. But perhaps you do enjoy the haphazard mix of /parameters, -parameters, --parameters, /p, -p with varying ways of specifying arguments to those parameters, like /x:foo, /xfoo, /x foo, /x=foo that can be found all over the place in the default Windows command-line tools (because that's what the argument was about here). In that case, yes, PowerShell is probably a huge step backwards.
- nailer 12y agoYou know, eg, Get-Process is `ps` and nearly every common command has two or three character aliases?
- lmm 12y agoAliases are the biggest enemy of consistency.
- fetbaffe 12y agoYes, I know. What I wrote had nothing to do with your point. I just did a fork of the conversation. Apologies if it created any unnecessary noise.