Powershell and its long winded cmdlets are really hard for me to like. I always fall back to cygwin on windows. I once wrote a PS script to set some power management options on a corporate laptop. The script was 11 lines long (vs 3 lines in Python), it was harder to read and understand. Even with ISE available it was much harder to write. I followed along with some exchange server tutorial where the prescribed easy w…
A Saner Windows Command Line
11–20 of 164 posts
Re: A Saner Windows Command Line
#12Powershell and its long winded cmdlets are really hard for me to like. I always fall back to cygwin on windows. I once wrote a PS script to set some power management options on a corporate laptop. The script was 11 lines long (vs 3 lines in Python), it was harder to read and understand. Even with ISE available it was much harder to write. I followed along with some exchange server tutorial where the prescribed easy w…
Re: A Saner Windows Command Line
#13> "And, purely subjectively, I think the .ps1 syntax is a lot more readable than the old .bat syntax." The Author does say "subjectively" but in my experience, both personally and with others, the reverse is true. Powershell can seem to be really cryptic.
Bash can be _extremely_ cryptic as well, we just learned it over time. Look at awk :)
Re: A Saner Windows Command Line
#14Posh also suffers in its somewhat easy to invoke any .NET library, so people start comparing it to a more tooled programming language or something with more sane libraries, and the "ISE" is nowhere close to an IDE (why isnt powershell a first class citizen in visual studio! yes I know there are tools, they are not great.)
Nonetheless, after a few years of working in sql server I have adopted more and more posh in my life because its simply the fastest way to get things done if you are doing windows server management.
I usually find myself on one of these two places if I am looking for something:
Mike Fal (SQL Server focus, he is great) http://www.mikefal.net/
Hey Scripting Guy! https://blogs.technet.microsoft.com/heyscriptingguy/
edit: forgot to mention that MSFT helped to cause problems by massive changing how the language did things over time(usually for the better), so ps1 vs ps4 is crazy different, another reason to be annoyed because which version comes with which product is a fun skew to deal with (thanks sqlps having ps2.0!)
Re: A Saner Windows Command Line
#15Re: A Saner Windows Command Line
#16At our office we jokingly refer to powershell as "two googles per line" - a term coined by its strongest proponent at the company. It thought it would come naturally over time, but it never does. It seems needlessly cryptic and verbose in so many ways. I've started using LinqPad for stuff I would normally do in cmd now.
Re: A Saner Windows Command Line
#17At our office we jokingly refer to powershell as "two googles per line" - a term coined by its strongest proponent at the company. It thought it would come naturally over time, but it never does. It seems needlessly cryptic and verbose in so many ways. I've started using LinqPad for stuff I would normally do in cmd now.
Agree on that one, it's really verbose and ugly. I liked the idea of a cmd that integrates so nicely with .NET but I don't think it worked out this time. We use powershell a lot at work for developer setup stuff and other common tasks we do on a daily basis and at this point I've considered just writing my own language to do it or find something else.
I wanted to learn Ruby a while back but didn't have a web project to work on so I started writing a load of scripts in Ruby instead. It worked out fine.
Re: A Saner Windows Command Line
#18Re: A Saner Windows Command Line
#19Re: A Saner Windows Command Line
#20Powershell and its long winded cmdlets are really hard for me to like. I always fall back to cygwin on windows. I once wrote a PS script to set some power management options on a corporate laptop. The script was 11 lines long (vs 3 lines in Python), it was harder to read and understand. Even with ISE available it was much harder to write. I followed along with some exchange server tutorial where the prescribed easy w…
> The script was 11 lines long (vs 3 lines in Python), it was harder to read and understand. Note that this might be true for one script, and the opposite might be true for another script. Something is saner in bash, something is better in PS. They have fundamental differences (text- vs. object-based), and neither of them is better than the other in all scenarios. (At least that's my experience.)
With Bash you get a wealth of tools because everything can handle text.