Announcement

Collapse
No announcement yet.

Microsoft Open-Sources PowerShell & Brings It To Linux

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by wizard69 View Post
    This is what I'm wondering. Does PowerShell bring anything useful to the Linux world? I really don't know because I've never used it. With the results I get from Python it would be hard to even consider another scripting language.


    It seems one of the main reasons PS is loved in the Windows world is its ability to pass around objects, not just strings, and its tight integration with Windows.

    Python is able to do it too, but I have no idea about how better it is at this. I suspect it is better.

    Here a comparison of basic things python vs powershell https://mohd-akram.github.io/2013/05...-to-powershell

    Comment


    • #32
      I think PowerShell is not simple enough to compete with bash for simple tasks.
      And it is not capable enough to compete with Python for complex tasks.

      It sits in some kind of weird no man's land between bash and Python, trying to unify a shell with an object oriented scripting language, but the resulting monstrosity is neither a good shell nor a good scripting language. (Not totally unlike Microsoft's attempt to marry phone and PC user interfaces.)

      The remaining use case for PowerShell on Linux is to migrate existing business logic from Windows to Linux. Not sure if Microsoft had that in mind when they made the announcement...

      Comment


      • #33
        Originally posted by chithanh View Post
        The remaining use case for PowerShell on Linux is to migrate existing business logic from Windows to Linux. Not sure if Microsoft had that in mind when they made the announcement...
        Considering they also ported their database, it's a possibility.

        I WANT TO BELIEVE.

        Comment


        • #34
          Originally posted by Michael_S View Post

          I suspect the value to Microsoft is in the reverse scenario, making it easier for experienced Windows systems administrators to work on Linux.

          If Microsoft's own stronghold, Windows Azure, has fully a quarter of its virtual machines running Linux then just about every enterprise Windows Server customer in the world probably has a hybrid server infrastructure. Making PowerShell work everywhere will probably keep Windows Server on more hardware than having more and more Windows sysadmins learn bash (or python, ruby, perl, etc...) and then abandon Windows entirely.
          Actually Microsoft recently said that Linux has grown to around 1/3 of Azure's VM now.



          PowerShell on Linux is a good thing because Bash and Ubuntu's userspace came to Windows via WSL so even Windows Server will have Bash natively (without Cygwin) and therefore little reason to migrate to Linux as a Unix scripter. PowerShell on Linux evens the playing field.

          I bet Microsoft made a deal with Canonical...

          Microsoft: "Help us bring Bash and Ubuntu's userspace to Windows and in return we'll bring PowerShell and SQL Server to Linux and grow your enterprise users by enabling our Windows customers leverage Ubuntu on Windows."

          Comment


          • #35
            Originally posted by chithanh View Post
            I think PowerShell is not simple enough to compete with bash for simple tasks.
            And it is not capable enough to compete with Python for complex tasks.

            It sits in some kind of weird no man's land between bash and Python, trying to unify a shell with an object oriented scripting language, but the resulting monstrosity is neither a good shell nor a good scripting language. (Not totally unlike Microsoft's attempt to marry phone and PC user interfaces.)

            The remaining use case for PowerShell on Linux is to migrate existing business logic from Windows to Linux. Not sure if Microsoft had that in mind when they made the announcement...
            It's a fair bit more powerful than I think many people realize especially in the latest versions. You just have to be willing to dig deep to figure out how to do things and lean heavily on existing library classes to get super fancy. For what the real bread and butter Powershell is meant for -- i.e. system management -- it does VERY well. About the only thing I've run into that's annoying is its inability to deal with filepath names that exceed the standard limits. It's also SUPER slow on some tasks such as enumerating all the files in a drive, but you can leverage external programs to fill in the gaps (i.e. using robocopy).

            You're right at least partially on the why. For shops that begin diversifying, they would like to help drive the devops (for lack of a better word) train on system automation across platforms so that shops don't go looking for other solutions and make full on migrating that much more attractive down the road. At least that's my take. Also it's pretty low hanging fruit to try to extend an olive branch to the Linux community.

            Comment


            • #36
              Originally posted by torsionbar28 View Post
              There's no compelling reason whatsoever to use a proprietary Microsoft shell.
              Maybe you didn't catch the "MIT License" part: https://github.com/PowerShell/PowerS...er/LICENSE.txt You could even fork it and re-license under the GPL if you were so hell bent on not using anything else.

              I've been using bash since right after I grew out of my 4DOS shoes, and while I've always considered PowerShell to be excessively verbose for my taste, lately I've had to dabble with some PowerShell scripts and I've found nothing inherently wrong with it.

              The biggest problem I see is requiring .NET for a simple shell.

              Comment


              • #37
                I am too lazy to go through the whole thread. But I didn't see anyone mention the whole point behind powershell. It solves the fundamental flaw of CLI that's been mentioned in the Unix hater's handbook. The output of a CLI is a wall of text. You have to use awk/grep/sed and hack through the text for useful info. Basically you're down to scraping text. With powershell the output is an object with organized properties. Suddenly piping is improved tremendously.
                I know you can use python (ipython), but it's not really a convenient shell.
                I used to be an idiot and complained that cmdlets are too long, and then discovered that they all have their own short aliases.

                Comment


                • #38
                  Originally posted by garegin View Post
                  The output of a CLI is a wall of text.
                  That's because CLI (shells actually, bash and similar) is a scriptable human-oriented interface.

                  With powershell the output is an object with organized properties.
                  As long as you use its internal functions (i.e. you are on windows), maybe.
                  If it is calling an external CLI program that can only answer with text (like 99% of CLI tools on *nix), how can it turn that in an object with properties?

                  That said, yes, the general concept of PowerShell as it is on Windows is neat, but to work on *nix it would need a unified API to communicate with all other userspace tools.

                  Hmm... sounds like a work for our lord and saviour Lennart.

                  Comment


                  • #39
                    Originally posted by theghost View Post
                    PowerShell, who cares?
                    I wait for the day when they finally bring on MS Office.
                    FTFY - wps.com/linux - Save $500 for using Linux, and pass Go.

                    Comment


                    • #40
                      Originally posted by ElectricPrism View Post
                      FTFY - wps.com/linux - Save $500 for using Linux, and get screwed by Chinese government.
                      fixed.
                      wps is nice and all, but it's a closed source blob coming from a company that is funded by Chinese government (for a bunch of reasons).

                      Comment

                      Working...
                      X