Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Monday April 08 2019, @11:43PM   Printer-friendly
from the Powers-Hell? dept.

Microsoft Announces PowerShell 7

Microsoft has just announced PowerShell 7, a new major release that comes only a few days after the company originally introduced version 6.2

And while it naturally makes more sense for the company to roll out PowerShell 6.3 rather than a whole new version 7.0, the company explains in a blog post that it's all as part of the efforts to align the versions of all platforms.

Steve Lee, Principal Software Engineer Manager, PowerShell, explains that Microsoft noticed a growing usage pattern on Linux, but not on Windows.

"Windows usage has not been growing as significantly, surprising given that PowerShell was popularized on the Windows platform," Lee explains. [...] The next version of PowerShell will thus be available on Windows, Linux, and macOS, and the company explains it'll be available with LTS (Long Term Servicing) and non-LTS plans.

Also at ZDNet.

Previously: MS Releases Powershell SDC - to Manage Config for.... Linux
Powershell for Linux
Your wget (and curl) is Broken and Should DIE, GitHubbers Tell Microsoft


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 0) by Anonymous Coward on Tuesday April 09 2019, @03:18AM (6 children)

    by Anonymous Coward on Tuesday April 09 2019, @03:18AM (#826531)

    So nobody has anything positive to say about Powershell? Not even anonymous so not to ruin all your tux-cred with the neckbeards? [...]

    So nobody has anything positive to say about Powershell? Not even anonymous so not to ruin all your tux-cred with the chestbeards?

    There, FTFY.

  • (Score: 3, Insightful) by evk on Tuesday April 09 2019, @08:36AM (5 children)

    by evk (597) on Tuesday April 09 2019, @08:36AM (#826618)

    Powershell has this nice idea of shuffling around objects instead of undefined data streams. So if you pipe a directory listing to something, you don't get a bunch of text that you can parse. You get objects with properties. This isn't a bad idea. For some reason they managed to mess up lots of small details which makes it surprisingly compex to to do things you'd expected to be easy.

    In bash I can usually write a one liner without referencing any documentation. For powershell I have a library of one liners for most things I wan't to do. Writing them from memory doesn't work for me.

    • (Score: 4, Interesting) by choose another one on Tuesday April 09 2019, @11:45AM (3 children)

      by choose another one (515) Subscriber Badge on Tuesday April 09 2019, @11:45AM (#826662)

      Powershell has this nice idea of shuffling around objects instead of undefined data streams. So if you pipe a directory listing to something, you don't get a bunch of text that you can parse. You get objects with properties. This isn't a bad idea.

      This. The idea that you have to turn everything into text and then parse it back out is actually the bad idea, and the source of so many bugs and exploits, but it is so ingrained in unix that we just take the breakage as being inevitable.

      I (very)vaguely recall years ago (probably before powershell) something similar was talked about for Guile (the GNU scripting lang) - I haven't kept up with Guile so don't know where it went or if that got implemented. There are GPL problems with it though (see last bit of https://www.gnu.org/licenses/gpl-faq.html#MereAggregation [gnu.org] ) - basically the whole pipeline becomes one program for GPL purposes, maybe (court will decide...).

      This isn't a bad idea. For some reason they managed to mess up lots of small details which makes it surprisingly compex to to do things you'd expected to be easy.

      That is pretty much Microsoft's MO.

      Thing is, PowerShell's big advantage is also it's biggest drawback here - all the functions all the objects all the properties, they are the .Net ones. IF(F) you are a .Net/C# dev (or maybe VB) then PowerShell is just a bit of slightly twisted syntax to learn, then everything you usually do in C# you can do in a script, and that actually is awesome. On the other hand if you are NOT a .Net/C# dev then you have to learn not just powershell, but the entire .Net framework, for a one line script.

      In bash I can usually write a one liner without referencing any documentation. For powershell I have a library of one liners for most things I wan't to do. Writing them from memory doesn't work for me.

      PowerShell is at least vaguely readable once you've written it. I used to be able to write Perl from memory, but I still had/have a library of one liners for Perl. Now, I dare not run them because I know not what they do...

      • (Score: 0) by Anonymous Coward on Tuesday April 09 2019, @02:52PM (2 children)

        by Anonymous Coward on Tuesday April 09 2019, @02:52PM (#826788)

        if you are NOT a .Net/C# dev then you have to learn not just powershell, but the entire .Net framework, for a one line script.

        I call BS on this.
        I am definitely not a .net or MS gal - Yes, Debian stole my heart of geek. I do have to admin Windows boxes. I do have to patch and maintain and support MS products inc Exchange SharePoint and Skype. You don't need to know .net to use PowerShell. It is useful to know how .net works and what's in it. For most things use the functions available and look up what you need when you need it.

        I've coded in perl bash py CSH Java (yes yes) DOS batch and frankly after using PowerShell for several years I miss it when using Ubuntu or redhat. No, the Linux version of powershell is not up to scratch. Nice try though.

        If not PowerShell then ... What? C#? Ask Microsoft to install python by default on all Windows machines? Install perl everywhere? Do it all in .NET?

        • (Score: 0) by Anonymous Coward on Wednesday April 10 2019, @07:06PM (1 child)

          by Anonymous Coward on Wednesday April 10 2019, @07:06PM (#827574)

          "I do have to admin Windows boxes. I do have to patch and maintain and support MS products inc Exchange SharePoint and Skype."

          no. you don't "have to" do anything. have some self respect instead.

          • (Score: 0) by Anonymous Coward on Thursday April 11 2019, @11:32AM

            by Anonymous Coward on Thursday April 11 2019, @11:32AM (#827841)

            Sure.I can starve.

    • (Score: 0) by Anonymous Coward on Tuesday April 09 2019, @06:36PM

      by Anonymous Coward on Tuesday April 09 2019, @06:36PM (#826987)

      Great summation.

      I'm not a Programmer with a capital P, but I do lots of shell scripting as part of system administration tasks; I've worn both linux and windows hats for the last 15 years and I've done extensive scripting on both OSes. Powershell is to me more of a programming language than a shell - it makes what I'm used to being a simple set of operations, turns them into a load of overly verbose commands, and then you have to either spend half your life piping into `get-member` or `select-object -property *` to see if the info you want was actually there or not, or if you maybe need to go and grab from some other object or convert that particular int into a datetime; bash and friends show you everything and provide you with really awesome tools for throwing away or converting stuff you don't want.

      I'm working in a windows team currently but we've been bringing in a lot of linux kit. Lots of the people were agog at having someone who could do "linux scripting", thinking it was some sort of prodigal thing; after showing them a few basic utils and some loops in bash they all took to it remarkably easy, because it's so much more WYSIWYG in nature than futzing around in powershell. bash and other *sh's make the transition from "remember this command" to "put this list of commands in a file and run it" to "wrap those commands in some logic and variables" really simple and really natural in a way I've just never experienced with powershell. Ultimately I don't think I've got an object-oriented brain because despite writing powershell stuff for over ten years now it still doesn't come naturally to me whereas bash scripts just trip off the fingers.

      Conversely, powershell allows you to do certain far more powerful things than you could realistically do in bash (writing REST interface stuff in JSON being a trendy example... but it was whilst porting a powershell script I wrote to linux that I discovered the python requests library which made the script even more bone-headedly simple than powershell) but the barrier to entry is much higher than I feel it is for bash. That said there's a whole bunch of windows utilities with very deep and very useful powershell interfaces that even python on windows can't hold a candle to, but those feel more of a necessary evil to me than a boon of powershell itself.

      My two cents.