Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Open Source Microsoft Windows Linux

Microsoft PowerShell Goes Open Source and Lands On Linux and Mac (pcworld.com) 400

Microsoft announced on Thursday that it is open sourcing PowerShell, its system administration, scripting, and configuration management tool that has been a default part of Windows for several years. The company says it will soon release PowerShell on Mac and Linux platforms. PCWorld reports: The company is also releasing alpha versions of PowerShell for Linux (specifically Ubuntu, Centos and Redhat) and Mac OS X. A new PowerShell GitHub page gives people the ability to download binaries of the software, as well as access to the app's source code. PowerShell on Linux and Mac will let people who have already built proficiency with Microsoft's scripting language take those skills and bring them to new platforms. Meanwhile, people who are used to working on those platforms will have access to a new and very powerful tool for getting work done. It's part of Microsoft's ongoing moves to open up products that the company has previously kept locked to platforms that it owned. The company's open sourcing of its .NET programming frameworks in 2014 paved the way for this launch, by making the building blocks of PowerShell available on Linux and OS X. By making PowerShell available on Linux, Microsoft has taken the skills of Windows administrators who are already used to the software, and made them more marketable. It has also made it possible for hardcore Linux users to get access to an additional set of tools that they can use to manage a variety of systems.
This discussion has been archived. No new comments can be posted.

Microsoft PowerShell Goes Open Source and Lands On Linux and Mac

Comments Filter:
  • Heu.. ???? (Score:5, Insightful)

    by ls671 ( 1122017 ) on Thursday August 18, 2016 @11:43AM (#52726183) Homepage

    Embrace, extend and extinguish ???
    Link:
    https://en.wikipedia.org/wiki/... [wikipedia.org]

    • This typically works when the MS product isn't being released on multiple platforms and open sourced. Obviously MS could always build closed source extensions, but there'd be no point. MS doesn't want to stay in the desktop OS market and with the failure of its mobile OS and their success with Office365, it seems like MS will start moving out of providing consumer level operating systems in favor of hosted solutions that enable them to charge reoccuring subscription fees. As consumers buy less and less "com
      • Re:Heu.. ???? (Score:5, Interesting)

        by Rob Y. ( 110975 ) on Thursday August 18, 2016 @01:20PM (#52727171)

        Umm, desktop systems and apps may not be the growth business they once were, but they still make Microsoft billions. It's not that they want out of those businesses - it's that they're trying to keep up with the overall industry move to the cloud. Not that it would be a bad idea for Microsoft to start basing their cloud operations on Linux - assuming they could get more out of their hardware that way. Maybe they really are thinking along those lines, and want their software to work there - for their own purposes. That'd be pretty forward-looking.

        Of course, Occam's Razor would favor locking admins into their Windows-specific toolset as the explanation...

      • by Dracos ( 107777 )

        I agree. I think MS is slowly abdicating development to *nix/FOSS so they can get it off their plate. They don't want to develop standalone software products anymore, they want to move everything to SaaS and more or less follow IBM's footsteps. But it'll take at least a decade, especially to get their enterprise customers (who are the only ones MS understands and cares about) on board for that transition. I bet in a few years we'll see OEMs actually be more allowed to preinstall other OSes. There may n

    • Though if it's open source, it's hard to take it away so the extinguish part may not be possible. It really depends on the license.

    • Re:Heu.. ???? (Score:5, Insightful)

      by Somebody Is Using My ( 985418 ) on Thursday August 18, 2016 @12:43PM (#52726801) Homepage

      No. Well, yes, but not in the way you think.

      This isn't about Microsoft trying to "conquer" Linux. Increasingly Microsoft is less interested in maintaining operating system dominance. The OS is not a growth market, and not one that people really care too much about; they use whatever their computer (or device) comes with. Instead, Microsoft is betting big on becoming an OS-agnostic software-as-a-service company. That isn't to say that they are entirely abandoning Windows (and knowing Microsoft's legendary inter-departmental rivalries, you can bet the Windows team is fighting the rest of the company to keep their product relevant) but long-term I wouldn't be surprised to see all of Microsoft's products available on Linux, MacOS, IOS, Android and any other OS they can reach. It - not Windows dominance - is where Microsoft believes the company's future is.

  • by Hylandr ( 813770 ) on Thursday August 18, 2016 @11:47AM (#52726233)

    It looks as though MS has finally accepted the inevitable.

    Though I shudder to think what hell may follow with MS getting it's fingers in the FOSS Pie.

    • The future for them is linux. There is no value in writing operating systems as we move to the cloud. The value is in charging monthly to host those systems and writing tools to use and manage those systems.

    • by nine-times ( 778537 ) <nine.times@gmail.com> on Thursday August 18, 2016 @12:36PM (#52726717) Homepage

      I think this is simple a smart move. You don't really have Linux admins saying, "Man, I wish I had Powershell!" as much as you have Windows admins saying, "I spent all this time making Powershell scripts. I wish I could run the same scripts on Linux." They're servicing their own users, and providing extra value in learning to use Microsoft technology.

      This is the sort of thing that I used to think Microsoft was stupid for not doing.

  • Bash...powershell (Score:2, Insightful)

    by the_skywise ( 189793 )

    Bash...

    Powershell...

    Bash...

    Powershell...

    RIIIIGGGHHHTT!!!!

    • That's what I don't get - what is the point of putting powershell on a unix box? Even if you have to administer Windows servers, I don't understand why you wouldn't just drop to bash (or whatever), ssh to the server and use powershell there. Why would you need powershell on the client?

      I feel like I'm missing something...

  • by VAXcat ( 674775 ) on Thursday August 18, 2016 @11:53AM (#52726271)
    Powershell isn't really a scripting language - it's a command parser where all the commands are like "Disassemble-the_Complicated-Dictionary-using-impossible-Format".
  • Every once in a while I get told to run something under cmd.exe or PowerShell, and am reminded how incredibly limited these apps are when compared with any *nix *sh terminal app. Why does anyone think Linux users would take PowerShell over bash?

    • Re:who wants it? (Score:4, Insightful)

      by Bobfrankly1 ( 1043848 ) on Thursday August 18, 2016 @12:17PM (#52726523)

      Every once in a while I get told to run something under cmd.exe or PowerShell, and am reminded how incredibly limited these apps are when compared with any *nix *sh terminal app. Why does anyone think Linux users would take PowerShell over bash?

      For many, working with an object-oriented terminal is immensely more preferable to having to wrangle text.

      • by 93 Escort Wagon ( 326346 ) on Thursday August 18, 2016 @01:18PM (#52727147)

        ... For many ...

        You keep using that word. I do not think it means what you think it means.

        (best read in a pseudo-Spanish accent)

      • by rastos1 ( 601318 )

        working with an object-oriented terminal is immensely more preferable to having to wrangle text.

        You would need to have the objects first. On windows you have objects representing registry keys, services, users, installed packages, processes, scheduled tasks, shares, office documents, etc. etc. - Powershell gets the power from that. And in order to be similarly powerful on Linux, it would need to have bindings for all that on Linux. Somehow I doubt that.

      • But with bash you can just start typing text. No need to look up obscure command system and object names if they only thing you want to do is get a list of all files matching a pattern. There's no text wrangling, you just start typing commands. And the same syntax you use for giving commands is used if you want a complicated script.

        The difference is that Unix is oriented around commands and programs that take input and give output; whereas Windows is oriented around DLLs and frameworks that build on top

        • Re:who wants it? (Score:5, Informative)

          by Bobfrankly1 ( 1043848 ) on Thursday August 18, 2016 @04:21PM (#52728607)

          But with bash you can just start typing text. No need to look up obscure command system and object names if they only thing you want to do is get a list of all files matching a pattern. There's no text wrangling, you just start typing commands. And the same syntax you use for giving commands is used if you want a complicated script.

          The difference is that Unix is oriented around commands and programs that take input and give output; whereas Windows is oriented around DLLs and frameworks that build on top of DLLs.

          So dealing with those DLLs from a scripting language is very powerful, but those are inherently complex operations. The learning curve is like a brick wall. Unix builds on combining very simple operations into more complex results. If you only use powershell twice a year you'll forever be stumped and lost, but if you use bash only twice a year you'll still be able to get stuff done.

          As someone who uses bash twice a month (red hat and ubuntu), finding some of the commands, or the correct syntax/switches frequently tends to be a frustrating experience. The man pages are occasionally helpful, but they're just as often a novel on something that's inapplicable, and missing the data I really need. That means a trip to google, and ending up on a blog page.

          When I compare that to the documentation in powershell, man seems like an empty water bottle, and powershell's Get-Help is a river. I can Get-Help -examples to skip directly to syntax examples, and I'm moved on to the next step before I've gotten half-way through a man document that *may* or may-not help me. Also, the naming of commands in powershell is *predictable* which is a *huge* help. Get-Command Get-* will return all the available commands for retrieving information, and Set- * for setting whichever.
          You can typically *guess* what a command does, just by looking at it. How frequently can you say the same for linux?

          Learning *either* can be like a brick wall, depending on what that person has already learned, but I see powershell's documentation and the obviousness of it's command names lends itself to faster learning, including among a couple of linux admins I taught a little powershell to. They still prefer the bash terminal, but I see the fluency of their powershell scripts jumping when they use it every few months.

        • But with bash you can just start typing text. No need to look up obscure command system and object names if they only thing you want to do is get a list of all files matching a pattern.

          You must be one of those people who wonders why foreigners speak foreign languages when English is so much easier to learn! (Even our children can do it) Bash is not magically easier than PowerShell for someone who only uses it twice a year. In fact, I would say that PowerShell is easier because it has a lot of built-in aliases to make it familiar to *nix users.

          Want to do a directory listing of all files matching a patter? Try ls *.txt. It will work in both bash and PowerShell. The arguments are different i

    • by Dr. Evil ( 3501 )

      Powershell has a very steep learning curve and IMHO lacks the end-user history of traditional unix shells.

      That said... doing things like having most of your OS exposed through objects for inspection and manipulation, even cells in spreadsheets or network resources has value.

      Yo

      • Powershell has a very steep learning curve and IMHO lacks the end-user history of traditional unix shells. ...

        The fact that it's so hard to do simple things makes it very difficult to add to your knowledge without reading a few books or taking some course on the subject, then using it daily in Windows admin work.

        I always wish I knew more about using it, but... unless you're deep in this stuff, it's better to skim the capabilities and let the Windows admins figure out the details.

        What you need is a user community. When I started out in powershell, I was pretty lost myself. I've progressed quite a distance because I found a community willing to help me understand when I was fighting the derpsauce. Find one that fits you, wether it's a mailing list, slack channel, or the like, and you'll find your progression accelerated.

  • What can Powershell do that BASH can't? Outside the Windows ecosphere, is there any use to this?

    • Piping is really enhanced and customizable in Powershell compared to bash. It's really a nice feature. On linux, piping commands in bash are extremely limited. mostly because the command you pipe from cannot customize what data it is going to output to the command you pipe to.

      As usual, Microsoft likes to integrate heavily whatever they are making, and it shows.

      • I find that they both make sense in their environments. I have no problem with piping in Linux because that's the way Linux command want to work. I sometimes find bash syntax cumbersome, but that's just because I'm unfamiliar. I love the pipeline in PS too. I use it all the time. I found PS much easier to learn from scratch than bash has been over the years. The Powershell_ISE is great too, and helps a lot.
      • by MightyMartian ( 840721 ) on Thursday August 18, 2016 @12:52PM (#52726905) Journal

        Ever heard of awk and sed? I've been doing complex manipulations of data using tools like this for most of my IT career. Christ, I used awk to transform weird variant field exports from a mainframe to CSV to be imported into an inventory system while the most complex shell language Microsoft offered was the MS-DOS 6 command.com.

        Honestly I think some of the people bragging up Powershell never really used *nix at all, at least not in any sophisticated way.

    • by gnupun ( 752725 )

      Bash is good for a few commands. But for complex tasks, you need a decent programming language and Bash is severely lacking in that area. Powershell has a good programming language.

      Another alternative, that is also a powershell competitor, is Xonsh, which is Python-based.

      https://developers.slashdot.or... [slashdot.org]

  • So, anyone with real experience want to weigh in on how Powershell compares to the Linux command line? I've only used it a bit, and nothing has really jumped out at me as more than an incremental improvement over (pseudo-) DOS. Basically - is this something that might actually be valuable to -nix admins, or is it just a way for Windows admins to leverage their existing skills when managing -nix systems?

    Either way I'm kind of surprised Microsoft is doing this - seems like the biggest effect would be to mak

    • They're not really comparable. PowerShell only exists because Unix shells don't work so well with Windows' binary registry (as opposed to plaintext, which is conventional on Unix-like systems).

      I really don't see much use for PowerShell on Linux -- maybe some portability reasons for lazy Windows admins. More likely this is just some token thing for Microsoft to open source for publicity, but won't lose them any sales.
      • I agree. It's not just the registry though. Everything is treated as an object in PS. I find it very easy to use. I've seen a couple of attempts to create a powershell-like, object-oriented shell in Linux. I've even tried out a couple of them, but the Linux commandline just isn't designed that way. The thing about PS for me is that I was already scripting Windows using vbscript and PS is much simpler and come with a whole host of functions (cmdlets) built in, including those that come with the server tools
    • by FictionPimp ( 712802 ) on Thursday August 18, 2016 @12:14PM (#52726485) Homepage

      Powershell can be really powerful. Everything is a object and it allows you to easily write your own cmdlets and modules to extend the shell. No more parsing the text output of one command to create input to another. It's really very slick.

      • Ever heard of #!/bin/sh ...

        You've been able to create sh scripts for decades, if you wanted to construct specific reusable scripts that invoked the toolkit in some specific way.

      • "Parsing"? What other tools have you been using?

        And the fact that everything is an object is not very helpful unless there is consistent polymorphism and iterability.

        As to easily extend the shell, you might have heard something like this:

        "This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface."

        This philosophy was first written down in 1978. Good of Microsoft to finally start c

    • by macxcool ( 1370409 ) on Thursday August 18, 2016 @12:15PM (#52726499)
      I use Powershell extensively to deploy applications using Microsoft SCCM at work. I use Linux the rest of the time. Bash scripting is very suitable to the way *nix commands work. Powershell is very suitable to scripting in Windows. I find PS very easy to learn and to work in, but only because I was already familiar with concepts like the pipeline (from Linux) and objects (from python ;-). I can create a PS script to install and configure an application quickly and easily because, just as in Linux there are commands that do everything you need to do, in PS there are cmdlets that allow you to easily (for the most part) access the various subsystems of Windows. I see PS as a greatly improved, much easier way of doing what I used to struggle to do with vbscript or, a long time ago, with batch files.
    • by txsable ( 169665 )

      If you'll wander over to the PowerShell Github repo [github.com], the readme does state that it is released under the MIT License. Of course, they bury that info at the very bottom of the page.

  • This just seems like a very poor excuse for puppet/chef/cfengine etc... to me.
    • by Nutria ( 679911 )

      Given enough time and money, Microsoft will eventualy[sic] invent UNIX.

      Have you forgotten Xenix?

  • bash (Score:2, Funny)

    by ichthus ( 72442 )
    Nah, we're good. But, thanks anyway.
  • This is awesome because only a linux fanboy would not see that:

    Get-ChildItem -Recurse | Select-String 'hole_in_the_ground'

    is sooooo soooo much better than

    grep -r 'hole_in_the_ground' /sarcasm
    • gci -recurse | sls 'hole_in_the_ground'
      grep -r 'hold_in_the_ground'

      Difference of about 10 characters.

      Also... there is tab complete in PS just like in bash so....

      Although, unlike in bash, tab completion also works for command line parameters as well so you wouldn't need to type all of "-Recurse" you would just need to type "-R" and then hit Tab once. so now the difference in keystrokes is fairly minimal.

  • ok seriously, does anyone else know of any shell that not only needs an entire framework install but also has 44MB of shit in it's source code?

  • by bernywork ( 57298 ) <bstapleton.gmail@com> on Thursday August 18, 2016 @12:19PM (#52726543) Journal

    The reason for doing this I thought would have been obvious, but from the comments it doesn't seem so.

    No Linux admin, who administers standard Linux bare metal or VMs is going to install this, not in a million years, they've got bash scripts with GNU utils, or they learnt Python or Perl or something else years and years ago, they've no use for PowerShell...

    If however, you use Azure (MS *are* the second largest cloud computing provider), and you want to do web scale, Microsoft either needs to start giving out Perl and or Python modules, or they need to get PowerShell on Mac / Linux for people to be able to script their Azure / SQL / Exchange instances so that the admins and devs can integrate with Chef and everything else out there.

    With the amount of work that's gone into Powershell for it to be an admins platform, it's *easier* to port Powershell to Linux than what it is to rebuild powershell for Python or Perl or whatever else.

  • Good because if it's truly open source, decent coders and groups can fork it, fix all the poorly designed and coded bugs...I mean 'features' it has.

    Bad because...Microsoft, stay the hell away from Linux. MS makes everything it touches worse, introduced more bugs and security holes.

  • Oh boy (Score:2, Interesting)

    by Anonymous Coward

    Has anybody looked at the .net open source to confirm if Microsoft code is actually quality or just lucky shit that just runs? Do developers(including contractors) hired by Microsoft code better than Open Source people?

    Stupid questions, but, I read somewhere that someone at MS stated they just push code that works but does not necessarily mean all the bugs have been worked out.

  • This is probably something they are doing in preparation to bringing SQL Server (and maybe Exchange) to other platforms. There server apps tend to be managed using PowerShell

  • by swb ( 14022 ) on Thursday August 18, 2016 @06:14PM (#52729313)

    I want to run Powershell commands within a bash shell and be able to pipe their output to Unix utils, and I want to be able to run Unix utils in Powershell and pipe their output to Powershell commands.

    I want to be able to mix and match them somehow.

    Mostly, I think, the Powershell commands would be most useful paired with a bash shell and Unix utils, at least how I end up needing/wanting to use Powershell most of them time -- which I freely admit is biased by much more experience at a Bash prompt than a Powershell one, and mostly using Powershell commands to generate some kind of output that I want to work with Bash-style.

    I recognize that merging them would be complex in some ways, as many Powershell commands return objects not output and the shell is just doing basic formatting of the object as textual output.

    But maybe there could be some kind of hydbrid mode pipe operator that would just do the basic console output it would normally do, but send it to an instance of a Bash environment, or some way to access Powershell cmdlets from within bash as if they were normal programs that provided output.

"The one charm of marriage is that it makes a life of deception a neccessity." - Oscar Wilde

Working...