back to article Open-source, cross-platform and people seem to like it: PowerShell 7 has landed

It may be shuttering its events, but the release door at Microsoft has continued flapping with the emission of admin darling PowerShell 7. We first looked at the preview of PowerShell 7 almost a year ago and found little to complain about. Frankly, the same can be applied to today's release – with improvements in compatibility …

  1. Waseem Alkurdi

    Who are you and what have you done with Microsoft?

    Oh, how we would've loved to believe that they are the new cheerful sandal-wearing open-source-loving Microsoft.

    No, they are still the old M$. The old Embrace, Extend, Extinguish M$, only this time, they've realised how Google and Amazon are exploiting FOSS to their own ends ... and they are aiming for a slice of the pie.

    From Azure hosting Linux instances to this (and everything in between), it's all about grabbing the market share.

    1. Steve Channell
      Windows

      Re: Who are you and what have you done with Microsoft?

      I think they've noticed that RedHat Enterprise license with support is more expensive than Windows Server, but customers still buy it because it is cheaper than employing kernel engineers.

      Powershell needs to be open-sourced to make it into Linux distributions for Docker and K8 support

      1. Getmo

        Re: Who are you and what have you done with Microsoft?

        > Powershell needs to be open-sourced to make it into Linux distributions...

        Anyone? Nobody? ... *crickets*

        Alright, fine: PowerShell already is open-source (MIT license) and cross platform since v6:

        https://github.com/PowerShell/PowerShell

        because it's built on .NET Core, which is the open-source and cross platform version of .NET Framework:

        https://github.com/dotnet/core

        Technically 2 products now, Windows PowerShell v5.1 (.NET Framework) and PowerShell v7 (.NET Core)

        1. 9Rune5

          Re: Who are you and what have you done with Microsoft?

          ...and if you want to edit the odd powershell script, why not install https://github.com/microsoft/vscode which is... oh look, another opensource project courtesy of msft. :)

          Another, albeit Windows-centric, interesting opensource project: https://github.com/microsoft/terminal It lets you host your powershell session(s) in style. I have mine set up with a shortcut to a ssh session that targets my NAS (OpenSSH now finally included with Win10).

          1. Anonymous Coward
            Anonymous Coward

            Re: Who are you and what have you done with Microsoft?

            Bad link dude...

            Try this...for a better, less Microsoft data slurpy version of vscode.

            https://github.com/VSCodium/vscodium

    2. oiseau
      Thumb Up

      Re: Who are you and what have you done with Microsoft?

      No, they are still the old M$. The old Embrace, Extend, Extinguish M$ ...

      Exactly.

      Nothing but the old MSBrace at work, which after all has been going on for more than 30 years.

      What I don't get is how people in IT (which should know better) actually marvel and gush at the sight of this Born Again Microsoft ™.

      O.

      1. IGotOut Silver badge

        Re: Who are you and what have you done with Microsoft?

        So embrace (their own product), extend by letting others use and write for it it and extengish by releasing it as open source.

        Yup sound like the same old to me????

        1. Anonymous Coward
          Anonymous Coward

          Re: Who are you and what have you done with Microsoft?

          Not their own product, but the Linux/open source "target".

          Then it's not too difficult to extrapolate based on the recent past. They would push it as a standard ("Open" XML) or until it becomes a de-facto standard (Office's "Open" XML), then change it in very convoluted ways that require you to use their own flavor (see: Google)

      2. Wayland

        Re: Who are you and what have you done with Microsoft?

        Microsoft have always been capable of this, it's just a sensible business decision right now.

    3. Michael H.F. Wilkinson Silver badge

      Re: Who are you and what have you done with Microsoft?

      Actually, MS producing a decent, even free program isn't without precedent. I really like MS-ICE (Image Compositing Editor). Great, easy, free tool to create mosaic images fully automatically.

      Haven't tried PowerShell yet, nor do I feel an urgent need at this point

      1. Anonymous Coward
        Anonymous Coward

        Re: Who are you and what have you done with Microsoft?

        That's free as in beer. Add to that the popular Powertoys (now available under the MIT license, but not back then IIRC)

        But free as in freedom? Not unless freedom is in Microsoft's interests.

    4. jmch Silver badge
      Facepalm

      Re: Who are you and what have you done with Microsoft?

      "The old Embrace, Extend, Extinguish M$"

      So if they keep their stuff closed source they're protecting their monopoly, and if they listen to complaints from the IT community, they're trying to trick users into some sort of honey trap? Glad you cleared that up!

      I mean, a commercial company listening to its customers to gain market share and increase revenue? Whatever will they think of next?

      1. jake Silver badge

        Re: Who are you and what have you done with Microsoft?

        "I mean, a commercial company listening to its customers to gain market share and increase revenue?"

        Normal companies, yes. But Microsoft isn't a normal company. All evidence suggests they haven't listened to what their customers actually want[0] in a couple of decades.

        [9] Starting with a secure, stable, logically thought-out operating system.

        1. Champ

          Re: Who are you and what have you done with Microsoft?

          >But Microsoft isn't a normal company. All evidence suggests they haven't listened to what their customers actually want[0] in a couple of decades.

          As a former Microsoftie, I really marvel at comments like this. In 35 years in the industry, with 3 at Microsoft, I never worked *anywhere* that paid half as much attention to its customers and what they wanted than Microsoft.

          But, I guess it's easier to just keep slagging off the old big bad wolf rather than realise the world might have turned a little.

        2. jmch Silver badge

          Re: Who are you and what have you done with Microsoft?

          "All evidence suggests they haven't listened to what their customers actually want[0] in a couple of decades."

          'Customers' = 'the ones paying the bills'. Microsoft's primary customers isn't the IT community, it's the business community. Microsoft's primary customers are mid-to-high-level execs and beancounters , and they all love Windows and Office. Us IT bods are just the ones who have to get it to work, and thus our desires as customers are a bit further down the list.

          Microsoft's customers don't want a "secure, stable, logically thought-out operating system". They want an OS that's easy to use, can run a lot of programs and mostly works, at a price they're willing to pay

          1. Anonymous Coward
            Anonymous Coward

            Re: Who are you and what have you done with Microsoft?

            And has free Candy Crush on the Start menu.

            1. W.S.Gosset

              Re: Who are you and what have you done with Microsoft?

              *bzzt*

              Minesweeper.

              MS has therefore been failing its customers badly since XP! (Or was it NT?)

  2. Anonymous Coward
    Anonymous Coward

    What's the point of it on *nix?

    It uses COM hooks for piping object data that dont exist on unix applications and conversely it doesnt do job/process control which is a primary function of any unix shell. So what's the point other than the novelty factor?

    1. Waseem Alkurdi

      Re: What's the point of it on *nix?

      Doesn't even do input redirection with <.

      1. Steve Channell

        Re: What's the point of it on *nix?

        Powershell pipes objects not lines of text.. '<' is not needed (think "cat text.txt | awk")

        1. bazza Silver badge

          Re: What's the point of it on *nix?

          And when one stops and thinks about it, pushing strings around in pipes is a whole lot less assured than passing objects. Objects have methods with typed parameters, so there's a whole lot less room for error. We've all seen untold numbers of bugs in bash scripts due to misinterpretation of piped data.

          The closest I can get is that it's like scriptable dbus.

          For all those not liking MS and their porting of PowerShell to Linux, think of this. Radically tearing up how scripting in Linux works is exactly the kind of thing that Pottering would do, see systemd, and now probably won't now that MS have done it first. Arguably that makes it less likely to displace the ancient unix way than if Pottering had got there first.

          1. Kabukiwookie

            Re: What's the point of it on *nix?

            Objects have methods with typed parameters, so there's a whole lot less room for error.

            Until there are changes to the object/methods and your POWER shell script stops working all of a sudden or worse starts displayimg erratic behaviour. Good luck troubleshooting that.

            Though you could always try turning it of and on again.

            1. Anonymous Coward
              Anonymous Coward

              Re: What's the point of it on *nix?

              Surely one day the output text that you're manually parsing in your bash script could change except you don't get any nice object oriented stuff to detect that and stop execution.

            2. BinkyTheMagicPaperclip Silver badge

              Re: What's the point of it on *nix?

              I mostly like Powershell, but it's definitely not perfect.

              However, if you're comparing its strengths (defined interface, some documentation), against a series of single purpose Unix utilities where the output can never be modified as it'll break things it's clear Powershell has the better architecture.

              I'd rather use Python, C, etc than either given the choice though.

              1. Portent

                Re: What's the point of it on *nix?

                I'm not sure I agree, One of the main Unix ethos is to "do one thing and do it well". The use of multiple small utilities, each feeding data to the next, is a deliberate design choice so that each utility is small, concise, reliable and works with each other. Personally I think I like that design choice.

                1. BinkyTheMagicPaperclip Silver badge

                  Re: What's the point of it on *nix?

                  Yes, I know this as I alluded to in my reply.

                  However, for automated processes a long chain of utilities is only 'reliable' because a great deal of care has been taken with the output, and people have shouted when output breaking changes occur (which they have). Getting to the people shouting stage, rather than having an object pipeline is not ideal.

                  I am also aware that there's effort underway to convert utilities to use libxo, which should make output less fragile.

    2. Anonymous Coward
      Anonymous Coward

      Re: What's the point of it on *nix?

      It does do process control. For job control, you're right. Neither does Perl - you shell out to get your jobs. PS can do exactly the same thing.

      Since we get told over and over that *nix is all about files, I don't know why you're bothering to mention COM objects. Of course it's not using those on Linux.

      So, other than jobs, what other kinds of object data are you thinking of? Extensibility is baked in by being able to directly access .Net Core methods. (Which, sure, will be limited for accessing compiled code on Linux). If you want lower-level resource management, there's OMI as a CIM provider.

      However, I don't think anyone's proposing that *nix gurus replace their tools wholesale - there's stuff that you need proper familiarity with to operate "well". Same on the Windows side, actually, despite popular belief (the amount of arguments I've had about AD and LDAP or Kerberos, even when the matter under dispute was in the RFCs for all to see).

      For cross-platform stuff in a mixed environment, I can see it would be a boon. In both directions. For me in previous incarnations, I managed bind, Postfix and Apache services. If I was primarily operating in Windows-land but managing such systems, I can very much see the use of being able to script all of those from Powershell. I used a combination of Perl and bash back in the day. Not having to switch back and forth between dialects would be nice.

      Others who'd started off with Windows would be keen on system deployment/DSC using familiar tools. And administrators of products that operate cross-platform, again using familiar tools. Infoblox and VMWare and stuff from vendors like Dell and HP have really good Powershell modules to manage their kit. And compared to CLI methods, the Powershell object-based approach is often way more efficient.

      The other way around, being able to code for Windows systems from your familiar environment and push out apps/system management stuff would also be useful. No extra dependencies for the target Windows systems. For example, if the person who wrote a user onboarding tool for AD at one place I worked had used Powershell, they wouldn't have been able to do things like create circular nested groups by jamming things into LDAP at the protocol level with no error checking. They were not actually an LDAP guru, but since it was the "VMS guy", apparently they were a guru at everything, except writing non-cowboy code. Their using a tool that operated at the application layer with the built-in AD error-checking would have been highly preferable in that instance.

      Even if you think us (mainly-)Windows bods are less skilled, us being able to administer stuff day-to-day without having to run to uber-gurus all the time is quite useful. You don't get bothered with grunt work and can concentrate on the fun stuff. We can use our "novelty" tools to deploy systems, update Infoblox with the appropriate host records in a managed way, do our own reporting blah blah blah.

      Basically, it's an option. Depends on your environment and work practices and predominant system fleet. If you don't see a use for it, that's absolutely fine. Like Java - if you don't need it, fine, why bother with the overhead? Don't use it. Java seems to still be popular though. Obviously people do find non-novelty uses for these things.

    3. Anonymous Coward
      Anonymous Coward

      Re: What's the point of it on *nix?

      I asked the same thing when WSL was premiered.

      These days the world is (thankfully) becoming a bit more *nix centered and allowing people who already have significant investment in DotNet/C#/Powershell to write their scripts and code in a familiar language is worth more than you might realise until you want or need to do it. Running VS Code to edit and run powershell scripts on a Ubuntu desktop is actually rather liberating and surprisingly productive.

      It only serves to prove that MS is not particularly interested in selling you a copy of Windows any more, they are much more interested in you using their software and services and charging a (in my opinion) not unreasonable price for it.

      I remember the days when you could (or had to) steal Windows/Office/Visual Studio - now it is possible to develop software and target any OS using MS tooling for just the cost of the hardware.

      Like it or not I genuinely believe Satya Nadella HAS changed MS for the better. At least there's no more Steve Ballmer...

  3. martinusher Silver badge

    Bash gets the extend, embrace, extinguish treatment

    Its nice that Microsoft finally cottons on to the idea of a proper shell -- this whole MS-DOS command.com thing has been hanging on decades beyond its sell-by date.(It was a hacked up version of an early shell with CP/M 'notes' anyway... crude and simple but adequate for simple tasks.) Since there are a lot of people out there who only know Windows its natural that they would treat this as the Second Coming, the "Shell to Replace all Shells" but those of us who've been living with shells for decades just stifle a yawn - its just another Microsoft copy of a standard program with enough twists and tweaks to make it platform specific. Yes, of course it will be portable but it will be a bit like .NET -- "portable-ish", or "not really" -- but nothing like as flexible as the real thing and as my Windows diehard Millennial son discovered its missing a lot of useful features. (Side note here -- as any parent will know its quite normal for one's children to disregard parental advice -- any advice, from the personal to the technical. So out of touch parent tells with-it kid over a period of a decade or two that maybe there's something to be learned from these weird 'ix' systems with their arcane command line commands. With-it kid just goes down the MSFT rabbit hole into the labyrinth of confusion and complexity that comes with badly thought out and badly structured code (but, hey, its knowledge, isn't it?) only to find that it really is a bit of a blind alley after all, there's nothing you can do on Windows that you can't do with a lot less hassle on Linux and so on.)(Rules of parenting all kids, including adult versions, include never to openly say "I told you so...." but its soooo tempting......)

    1. jonathan keith

      Re: Bash gets the extend, embrace, extinguish treatment

      I believe the appropriate phrase is "I hope you've learnt a valuable lesson."

    2. Anonymous Coward
      Anonymous Coward

      Re: Bash gets the extend, embrace, extinguish treatment

      ... there's nothing you can do on Windows that you can't do with a lot less hassle on Linux and so on.

      Off the top of my head:

      1. Group policies (and AD in general)

      2. Using the thing with a touchscreen.

      Hate Microsoft to your heart's content, but hey, they do care about their paying customers.

      1. Kabukiwookie

        Re: Bash gets the extend, embrace, extinguish treatment

        Hate Microsoft to your heart's content, but hey, they do care about their paying customers.

        When did this happen? Did I miss a highly improbable historical event?

      2. Alumoi Silver badge

        Re: Bash gets the extend, embrace, extinguish treatment

        Funny about that touchscreen, my Surface3 is quite happy running Linux Mint and the touchscreen is working great.

        1. Anonymous Coward
          Anonymous Coward

          Re: Bash gets the extend, embrace, extinguish treatment

          The hardware works good. The software is less so.

          GNOME is arguably the best touchscreen UI on Linux, yet it's buggier than the buggiest Windows.

          KDE and Qt's touch support ... don't get me started.

          The only tolerable option is i3wm, but the applications are still terrible due to GTK widgets not supporting multitouch.

          1. bazza Silver badge

            Re: Bash gets the extend, embrace, extinguish treatment

            ...KDE and Qt's touch support ... don't get me started.

            I don't know about Qt in general, but BlackBerry's BB10 (which leveraged Qt) was really very good in the touch department.

      3. bazza Silver badge

        Re: Bash gets the extend, embrace, extinguish treatment

        Off the top of my head:

        1. Group policies (and AD in general)

        2. Using the thing with a touchscreen.

        Hate Microsoft to your heart's content, but hey, they do care about their paying customers.

        1) I think that there's plenty of evidence for that. SAMBA seeks to clone AD in general. Also there's more tools to integrate Linux management into Windows Domains than there are to integrate Windows (or indeed, anything else), into Linux / Unix management. NIS+ anyone?

        2) Personally I consider Gnome's efforts to be both touch / desktop friendly has resulted in some unnecessary and avoidable awfulness. At least some distros (Centos) using it somewhere down the line have had huge window controls, presumably for the benefit of fat fingers on a touch screen, that completely waste screen space on a desktop.

        1. This post has been deleted by its author

        2. Anonymous Coward
          Anonymous Coward

          Re: Bash gets the extend, embrace, extinguish treatment

          1. SAMBA - yes, correct. But you didn't answer for Group Policy. Nothing on Linux is even close to replicating the functionality found there.

          2. It's not about awfulness. It's worse. GNOME is my daily driver and is frankly driving me nuts! Single touch would require double or triple taps to work (a GNOME on Wayland bug) and X11 would do the opposite - interpret one tap as two or three taps (both only on GTK3 widgets - no issue with GTK2 or Qt on that end)

          And the chamber of horrors that is called daring to actually scroll using your finger - like naturally expected from a touchscreen. Only works on GTK3 widgets, Firefox and Chrome. Utterly broken beyond any hope (Windows XP touch scroll functionality) on GTK 2 or Qt (including Qt 5.x too, with some exceptions).

          Proper touchscreen interaction on Linux (my pet peeve) is possible - BB10 (Qt - as you mentioned) and Android (Linux without X). It's only that no corporation has paid to have it actually done properly on Linux with X11 or Wayland. It's done by a bunch of contributors, with no product quality control at all, compared to commercial efforts like Android, BB10, the Linux operating system on Tesla dashboards, heck, the Linux-based OSes on e-readers ...

          (And no, before anybody suggests it, Touchegg isn't a solution)

          So, basically, GNOME has successfully screwed up desktop for (multi)touch support ... of quality that's not even alpha-level.

          1. jake Silver badge

            Re: Bash gets the extend, embrace, extinguish treatment

            Patient: Doctor, it hurts when I do this! (demonstrates)

            Doctor: So don't do that!

            In your case, perhaps stop using the Gnome+Wayland clusterfuck and use something that works? Might I suggest trying Slackware's bog-stock implementation of KDE, just for a start? It works for MeDearOldMum ...

            1. Anonymous Coward
              Anonymous Coward

              Re: Bash gets the extend, embrace, extinguish treatment

              In your case, perhaps stop using the Gnome+Wayland clusterfuck and use something that works? Might I suggest trying Slackware's bog-stock implementation of KDE, just for a start? It works for MeDearOldMum ...

              Does she use it on a touchscreen though?

              Believe me, I tried KDE. It's a hit-and-mostly-miss with multitouch (only certain modernized widgets respond to multitouch, but the vast majority doesn't, and by the way, it looks awesome on a computer without a touchscreen).

              I also tried GNOME 3 (X11, Wayland), KDE (X11, Wayland) i3wm (X11), Openbox (X11), Cinnamon (X11). All suck with regards to multitouch. The only one which can even touch-scroll with one finger is GNOME.

              KDE is described above.

              i3wm works, but only because its window management is like a "Tablet Mode", and multitouch won't work without Touchegg, which is another hacky hit-and-mostly-miss abomination.

              And Openbox and Cinnamon are totally useless.

              Even though I detest GNOME with a grudge, I still want to use my Linux tablet PC as a tablet PC, because that's what tablet PCs are there for, so I'm compromising until I find any alternative.

    3. Peter Gathercole Silver badge

      Re: Bash gets the extend, embrace, extinguish treatment

      Whilst I agree with your general sentiments, there are things that PowerShell can do that ksh, bash and all of the other derived shells just can't.

      Unix shells are great at the "stream of bytes arranged as lines" way of passing data, and when you are in a CLI environment, where people interacted with the systems through line-by-line interfaces (as opposed to form or even GUI based admin methods, this works well. As Linux is a derivative of UNIX (albeit a non-linear re-implementation), and most things have command-with-arguments or file based administration methods, things work great. Even where there are GUIs, more often than not they are grafted on top of the shell commands that actually do the work, which you could just have easily run from a shell script.

      But things are changing. More and more, settings are stored in XML or object based storage, and unless you have a command that you cal call from the shell to manipulate these object, shell does not hack it anymore.

      Some time ago, I tried to control some KDE processes (specifically knotes) that talked via kdbus or dbus or somesuch, and there were some objects that could be returned which did not map conveniently into something that a shell process (even using awk to help) could cope with, because the object-to-object mapping was very difficult to represent.

      The more OS administration relies on objects that can no longer be represented in stanza or delimited files (and I include XML and related files in the 'difficulr' category), the less likely it is that bash et. al. will be able to hack it.

      Of course, you could say "what's wrong with stanza or delimited files", but that is a completely different discussion, but basically as the systems get more complicated, the associations between different subsystems and objects just get too complicated to represent in flat files.

      I don't like PowerShell becoming the default shell for administering *IX systems, but there is a need for something with more that flat file manipulation, and unfortunately us UNIX and Linux admins have been able to just about hack it using script gymnastics in Posix type shells and related commands up until now, so nothing more capable caught on in our space. We're as much to blame as Microsoft (I'm sure there are object based shells, but I can't name one off the top of my head, which shows how well they've penetrated the *IX space).

      I feel really old. As a 40+ year veteran of UNIX and related systems, I am used to the traditional ways of doing things, and all of the PowerShell, systemd, Object and database based configuration and software communication busses just make me think that I'm past the point of being able to move on in to the future in the IT industry.

      But I do wonder whether all this new complexity is actually worth it in the long run. Soon you will need an AI just to be able to administer some of these complex systems, and human beings just won't be up to the task.

      Try to fix a broken system? You're having a laugh!

      1. Adair Silver badge

        Re: Bash gets the extend, embrace, extinguish treatment

        KISS always wins - in the end.

        As senescence builds in ageing [ahem!]... As senescence builds in maturing systems those in need of elegant, logical, and manageable systems to handle their requirements begin looking for serviceable alternatives. Someone somewhere, looking around in disappointment, will inevitably have begun to scratch that itch and others will, inevitably, join them.

        Not so much 'reinventing the wheel' as making sure a simple, usable 'wheel' is always available, rather than whatever it is that someone wants to sell us, that just happens to have the label 'wheel' attached to it.

        1. phuzz Silver badge

          Re: Bash gets the extend, embrace, extinguish treatment

          'Simple' can be defined in several ways.

          Is the simplest solution to use a shell/scripting language that deals with piping everything as strings, and leads to complex grep/awk/sed commands?

          Or is it simpler to use a language that can pipe everything as objects and requires less translation along the way?

          Or is the best way to use whatever you're most comfortable with?

          1. Peter Gathercole Silver badge

            Re: Bash gets the extend, embrace, extinguish treatment @phuzz

            What has made *IX administration with Bourne and derived shells so long lasting is the ubiquity of it.

            I have found that if you keep to Bourne shell syntax, for all it's limitations, the resultant scripts will just work in ksh, bash, ash et. al. (well, there are some differences, like the order of pipeline construction and the inheritance of file descriptors, but these are corner cases, albeit not common).

            This is partly your "whatever you're most comfortable with" point, but it is also something you've not touched on. It's standard and available almost everywhere, and it's not just what I'm comfortable with, it's what every *IX administrator is comfortable with.

            If we get to the point where, for example, PowerShell, ipython, Rush or psh is mandated for administering a system, then firstly, tradditional *IX admins have a learning curve ahead of them that they would not have with a posixy shell, and secondly, how stable/reliable/maintainable is the system (I'll pick Rush as an example here which almost got abandoned).

            On top of that, you've got a very strong 'not invented here' streak in the community, especially when Microsoft are associated with it.

            1. bazza Silver badge

              Re: Bash gets the extend, embrace, extinguish treatment @phuzz

              On top of that, you've got a very strong 'not invented here' streak in the community, especially when Microsoft are associated with it.

              That's certainly true, but the same could also be said of systemd. The outcry didn't stop systemd finding its way into a large number of distros, largely through the domination of a single company (RedHat) of a key project (Gnome).

              At least MS aren't forcing Powershell on all admins...

              1. Peter Gathercole Silver badge

                Re: Bash gets the extend, embrace, extinguish treatment @phuzz

                Agreed about systemd. I'm still debating whether to shift to Devuan. I know I do not like trying to fix a systemnd system that does not boot correctly.

                On the subject of PowerShell, of course Microsoft are not directly pushing it. They don't have to.

                Very few organizations deploying Linux are pure. Most run MS operating systems as their primary environment, with an enclave of Linux. In this type of environment, the Windows admin teams will lobby to have PowerShell on the Linux systems, not Microsoft, because they will point out to the managers how convienient it is to have a single management system, and <how much easier it would be and cheaper</i> if they could manage parts of the Linux environment using the same infrastructure as the rest of the environment.

                And because the managers are conditioned by the bottom line on their budget, they will believe the Windows admin's over the objections of the Linux admin team, who now see their jobs at risk.

                I've seen the loss of influence of the *IX admins, and the corresponding rise in Windows almost everywhere I've worked over the last 20 years, and it's not going to stop now.

                1. jake Silver badge

                  Re: Bash gets the extend, embrace, extinguish treatment @phuzz

                  "I've seen the loss of influence of the *IX admins, and the corresponding rise in Windows almost everywhere I've worked over the last 20 years"

                  I've seen quite the opposite, and apparently so has Redmond. There is a reason they are playing with Linux, and it's not because they are suddenly seeing eye to eye with The Friends of RMS.

              2. jake Silver badge

                Re: Bash gets the extend, embrace, extinguish treatment @phuzz

                "That's certainly true, but the same could also be said of systemd."

                Could it? I don't think it's the same thing at all ...

                "At least MS aren't forcing Powershell on all admins..."

                Linux isn't forcing the systemd cancer on anybody. RedHat has chosen to include it in their distribution, and lazy and/or unthinking down-stream distributions have gone along with it. There are plenty of Linux distro options that do not use the systemd cancer.

                Linux is just the kernel. As long as the kernel doesn't require the systemd cancer there will be distributions available without it. And Linus (who ought to know!) has stated that the kernel will never require the systemd cancer. QED

  4. Anonymous Coward
    Anonymous Coward

    Choice

    It is funny that open source evangelists on this site are always banging on about choice. "If I don't like this shell I can use that one." Yet, when offered another (open source!) choice in PowerShell we just get negative comments here. It is a choice. Nobody is forcing you to use it if you don't want to. However, anyone with an open mind should look at it to decide if it fills a requirement or has a use case. Obviously, enough people on non MS OS's have decided it does have a use or it would not exist.

    1. jake Silver badge

      Re: Choice

      People aren't negative about choice. Far from it. The more the merrier.

      People are, however, negative about implementation. Frankly, PowerShell is pretty much useless on *nix as currently implemented. I suspect most of the folks being negative are more than willing to continue eyeballing the offering (self included!), but probably won't be using it any time soon, kinda like the systemd cancer, etc.

      1. Trixr

        Re: Choice

        If "everything in *nix is a file*, I don't know how you can say it's "pretty much useless". I can think of plenty of ways to operate a mail/dns/web server using PS as it is on Linux.

        But honestly, don't use it if you're a pure *nix admin. It's fine, no use for you? Don't use it. If anyone builds a distro that has it baked in, don't use that distro. It's not hard.

    2. Anonymous Coward
      Anonymous Coward

      Re: Choice

      "Obviously, enough people on non MS OS's have decided it does have a use or it would not exist."

      Yeh, Microsoft wouldn't be doing this to extend lock-in because Microsoft only does what users need.

      1. Anonymous Coward
        Anonymous Coward

        Re: Choice

        It is an open source project being offered for free. You are under no obligation to download and use it. Not sure how that is locking you in.

        People are using this and contributing back to it. Should MS ever try to "lock you in", then you can always stop using it and use a different shell.

        1. Waseem Alkurdi

          Re: Choice

          Use it, and use it long enough to become a standard, and bam, Microsoft changes in weird and funny incompatible ways that you can't do anything in return.

          Fine, fork it. But the fork would quickly descend into either obsolescence or becoming a different incompatible project.

          1. Anonymous Coward
            Anonymous Coward

            Re: Choice

            It has been the standard in Windows since the original version was used in Exchange 2007. New versions add features, but maintain backwards compatibility. Breaking this would be fundamentally stupid.

            It will never gain the traction needed in Linux to become "the standard" you appear to be so afraid of. Bash will likely be the pre-eminent shell for a while yet. However, it may help you solve a problem, in which case, use it. If not, no skin off mine or Microsoft nose. It will help cross platform developers and administrators. It may also be a eye opener for anyone willing to actually use it before criticising.

            I prefer not to be close minded and evaluate all tools on their merit. If they are useful, I will use them. If all you have is a hammer, then all you can do is bash.

            1. Anonymous Coward
              Anonymous Coward

              Re: Choice

              It will never gain the traction needed in Linux to become "the standard" you appear to be so afraid of.

              So was said of Office back in the days Lotus 1-2-3 or WordPerfect (or whatever) was dominant.

              Perhaps that's a little stretching the analogy, but there, it's happened before.

              I prefer not to be close minded and evaluate all tools on their merit.

              Those who don't remember history are doomed to repeat it.

              If they are useful, I will use them. If all you have is a hammer, then all you can do is bash.

              Pun intended? :-)

    3. Wayland

      Re: Choice

      Personally I like the contributions Microsoft is making to Linux. However that's the first stage, embrace. They extinguish it in one of that later stages.

    4. Wayland

      Re: Choice

      "Obviously, enough people on non MS OS's have decided it does have a use or it would not exist."

      That's obvious you've not thought this through. These corporations are quite capable of murdering things people find useful because of a less than obvious long term strategy to shape the market rather than shape their product to the market.

  5. thinking ape

    So they're now pushing the most confusing and worst shell possible? How is powershell still relevant?

    There are better crossplatform alternatives

    1. Adrian Harvey

      I know Powershell syntax is odd in some places, and I'm not very keen on it, but the concept of passing the pipeline around as objects is clever and powerful. It avoids having to re-parse data (and, speaking for myself, often incorrectly or without correctly dealing with all the corner cases.)

      Are there actually any other shells that implement this concept? Cross platform too?

      1. Anonymous Coward
        Anonymous Coward

        > the concept of passing the pipeline around as objects is clever and powerful. It avoids having to re-parse data (and, speaking for myself, often incorrectly or without correctly dealing with all the corner cases.)

        The concept of passing the pipeline around is clever and powerful and I'm all for it. However it doesn't avoid the need to re-parse data. There has to be some sort of underlying structure - JSON or XML perhaps - and the next process in the pipeline needs to understand what it's being given. An analogy in the Unix world is 'find' which can produce a list of files that are either zero terminated or space separated. The next process in the pipeline needs to be told which terminator/separator to expect.

        If someone is going to produce a new object oriented pipeline for Unix then I humbly submit that the pipeline needs to do two things at once:

        1) Provide an object data pipeline from process to process

        2) Provide an error status pipeline from process to process

        Currently under Unix, an error causes the execution of processes in the pipeline to stop. (Or sometimes not stop!)

        If, as is sometimes the case, an error is not critical then specific handling in the script is required to deal with it. Something that incorporates that special handling more smoothly would be a welcome and useful improvement.

  6. YetAnotherJoeBlow

    I use PS

    I use a hacked up version of Wine for some of my clients that I manage with a hacked up version of MS PS 6.2x. It saves me so much time its indispensable.

  7. Anonymous Coward
    Anonymous Coward

    Just use Python

    ^ see title.

  8. Anonymous Coward
    Anonymous Coward

    Syntax...

    I did use PS for some things a while back, but the syntax was really clunky. Have they fixed that?

    1. Anonymous Coward
      Anonymous Coward

      Re: Syntax...

      If they "fixed it" it wouldn't be power shell.

      It's slightly different in approach to most languages but that's intentional and powerful when used correctly.

    2. Anonymous Coward
      Anonymous Coward

      Re: Syntax...

      At least powershell has a consistent syntax, unlike fucking tar.

      But yes, it can be quite 'wordy' compared to the 2-3 character unix tools. (There is some three letter aliases for common commands, and of course you can alias whatever you like).

      It works better for scripting than as a shell imo.

    3. Anonymous Coward
      Anonymous Coward

      Re: Syntax...

      what's clunky about $c={param($a)(-$a+1)..($a-1)|%{$b=[math]::abs($_);((-$a+1)..($a-1)|%{$i=$a-[math]::abs($_)-$b;if($i-gt0){$i}else{' '}})-join''};.$c 0;.$c 1;.$c 2;.$c 3;.$c 9

  9. steviebuk Silver badge

    Need a new book

    I beg of someone in the know, to write a website or book with real world scripts and then take each bit of the script and explain what it is all doing, step by step. For people like me who aren't the brightest, need hand holding especially when learning something new. The amount of sites I find with example scripts and then the person assumes you have a degree in computing so we get

    "This script takes the output of the current object and pipes it into the next command that processes it into an output table."

    Explain what the pipe is! Don't just say it and assume we know. I now do, but others don't.

    I searched for a while the other day to find out what the fuck $_ was and then $_.name used in scripts and on sites but no one explains the little details. What is that specific bit of code doing!

    I found one guide but it was explaining about a Linux command. But was exactly how I want Powershell guides. The guide had broken down every bit of the Linux command to explain what each bit did.

    I then found one site that finally explained the $_ in English. Its a global variable. Like a big box with nothing in it but where you can store data. Because its global its built into powershell so you don't have to declare it (say what it is). You can add it on to a command to store the results of the command into it.

    With $_.name you're taking the data that is in your big box and I believe the .name means that data is a file name.

    Please make that book. I'd buy it.

    1. werdsmith Silver badge

      Re: Need a new book

      Try the Month of Lunches style books.

      https://www.manning.com/books/learn-powershell-scripting-in-a-month-of-lunches

      It has a chapter on visualising the pipeline and parameter binding. Worth a look.

    2. phuzz Silver badge

      Re: Need a new book

      "With $_.name you're taking the data that is in your big box and I believe the .name means that data is a file name."

      Mostly correct, but just to give you a bit more info:

      In Powershell you can store more than one type of information in a variable. The word after the dot (.name in this case) means you specifically want one part of the data, in this case the name of the file. In this example ,$_.CreationTime would refer to the time the file was created, or $_.Length would give you the file size.

      I do agree though that learning the absolute basics ("wtf does 'pipe' mean?") is tricky, because most books/documentation assume at least a base level of knowledge. Fortunately, just putting a question into a search engine often gets some good results.

      Once you understand the basics, Microsoft's Powershell documentation is quite good, especially if you skip to the end and look at the examples.

      1. steviebuk Silver badge

        Re: Need a new book

        Thanks. Very good to know. Used it in a script to remove - from thousands of files this week and replace with a space.

        Got it working but wasn't totally sure what the $_.name bit was doing. Looking up name for Powershell didn't help either.

    3. gryphon

      Re: Need a new book

      Umm.

      Sort of.

      It's more often used in something like this

      get-disk | where-object {$_.PartitionStyle -eq "MBR" | ft number, friendlyname

      So you are getting details of all your disks as objects, looking within each object for the PartitionStyle equaling MBR and displaying some other info about the disk

      For disk you could also do $_.Model, $_.NumberOfPartitions, $_.Size and so on

      I've read a few articles that describe $_ as the variable of the pipeline if that makes more sense.

      i.e. get-disk puts the disk objects into the pipeline and you can then look up their values using $_

  10. Sam Paton

    Going forward... really?

    How about “in the future”.

    It’s bad enough people saying it, without it being used without irony in my favourite source of snarky tech news.

  11. TVU Silver badge

    Extend, embrace, extinguish...

    ...is completely outdated horsepoo these days and those who continue to spout this nonsense ought to get out more and get a life.

    Microsoft's hostility to all things open source and Linux ended the day that Steve Ballmer departed the company (and no, you are not missed). Linux has won everywhere bar the desktop which is why Microsoft has had to learn to coexist with Linux. You also know when Linux has won when Microsoft's own Azure Sphere and Azure Cloud Switch operating systems have a Linux kernel.

    (from a Linux user)

    1. Anonymous Coward
      Anonymous Coward

      Re: Extend, embrace, extinguish...

      You can say that with regards to Microsoft, but corporate greed, including the exploitation of open source, is alive and kicking. And corporate greed was the mantra of the EEE era.

      Modern non-MS examples? Google and Android, Amazon and, well, everything Linux, ...

      You also know when Linux has won when Microsoft's own Azure Sphere and Azure Cloud Switch operating systems have a Linux kernel.

      They are jumping onto the bandwagon. Or else the paying customers leave. All about following the money, not a sudden infusion of principles or something equally detrimental to profit.

    2. Wayland

      Re: Extend, embrace, extinguish...

      I'm enjoying Microsoft's contribution to Linux but I don't trust them not to do their usual trick. If you know the story about the current Office XML formats you will know what slippery worms they are.

  12. HashimFromSheffield

    As someone who started out scripting with CMD and Batch and now mainly works in Bash, I could never stand Powershell's syntax. Seems ridiculously verbose and convoluted, not to mention symbol-heavy.

    1. Rockets

      I haven't had to use Powershell for a while now but I found scripting with Powershell was mostly fine but when using it to interact with systems live for troubleshooting or configuring some advanced option it felt like I was typing an essay to get meaningful data out of it. Plus the tab to autocomplete only choosing the next thing alphabetically drove me nuts coming from BASH. When PowerShell first came out I was heavily using it with Exchange 2007 and then when Exchange 2007 SP1 was released numerous variables changed and with release of 2010 numerous commands completely changed and broke a lot of my scripts that I'd built up.

  13. hoola Silver badge

    Anyone who thinks that this is Microsoft being philanthropic for the greater good of computing is, I fear, misguided. Just as they became the default because of the GUI, this move will most likely end up with a heap of costly licensing once a critical mass is in there. This way the can make money out of all slices of the pie. It is then only a step to pull the Linux users into Windows Core or some future abomination that I am sure they have in the pipeline.

    Maybe I am just being cyncial but that is the problem having been around since the dawn of time for computers.

    1. oiseau
      Thumb Up

      ... only a step to pull the Linux users into Windows Core or some future abomination ...

      Maybe I am just being cyncial ...

      No ...

      You are not being cynical, you are just being realistic.

      Basically because your IT memory is intact.

      And you have read the writing on the wall.

      O.

  14. jeffdyer

    "Shuttering" That's not a word, please stop using it.

    1. jake Silver badge

      This morning ...

      ... you were seen buttering your toast.

      I suppose you want to eat it, too.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like