back to article Microsoft has open-sourced PowerShell for Linux, Macs. Repeat, Microsoft has open-sourced PowerShell

Microsoft has published PowerShell, its scripting and automation platform, as open source under the permissive MIT licence, as well as porting it to Linux and Mac, with an alpha build now available on GitHub. PowerShell is built on Microsoft's .NET platform, and one of the enabling pieces here is .NET Core, the refactored fork …

????????

World, upside down? When is what? Why the who?

WHICH FOR WHERE? *explodes*

23
0
Coat

It's like...

Forty years of darkness. Earthquakes, volcanoes.

The dead rising from the grave.

Human sacrifice, dogs and cats living together – mass hysteria.

26
0
Silver badge
Mushroom

End Of Days

As above, while you make your way to your nearest bomb shelter.

8
0
Gold badge
Unhappy

As above, while you make your way to your nearest bomb shelter.

Nawwwww.

You missed the key part.

No trace of Outlook.

MS knows as long as they control the email and calendering in a firm they got any company by the hairiest parts.

1
1
Silver badge

They're taking over Linux!

Imagine a Ubuntu install with systemd, the Windows 7 theme, PowerShell, and Mono.

Run for the BSDs!

50
0

Re: They're taking over Linux!

I'd rather not imagine that if it's all the same to you.

'bout as bad as imagining Margaret Thatcher naked on a cold day.

https://www.youtube.com/watch?v=HOxeH_OQpFw

6
4
Silver badge
Devil

Re: They're taking over Linux!

It's the 'Extend' portion of 'Embrace, Extend, *EXTINGUISH*'

I predict WHOLESALE REJECTION of this nonsense, mostly because it's ".Not" under the hood. because if ".Not" is adopted as part of Linux, guess what's next? That's right, the same kind of ADWARE, SPYWARE, and TRACKING you get with Win-10-nic.

queue borg-speak "We will add your distnictiveness to our own. You will be assimilated. Resistance is futile"

14
9
Silver badge

They are targeting the ones who are taking over Linux

I mean things like systemd aren't inventions by Microsoft, they are inventions by people who have never experienced the elegance of a simplistic system, people who design their software for weird edge cases that never happen. It only makes sense to do everything to keep those people from learning about the UNIX philosophy. The potential goal is of course to turn the operating system market into something like the browser market, where you have a small oligopoly of vendors which can easily cooperate against the will of the user.

Then of course there's the even simpler explanation that software running on only one platform is kinda seen as irrelevant these days. I wonder how usable it is without the rest of the operating system. After all it does not just simply pipe around text as unixoid shells do.

13
1

Re: They're taking over Linux!

I think that this is part of the general plan they have for virtualisation and true portability.

They are going from the proprietary model to the open model albeit with very small steps. This nall helps so that they can attarct a bigger market share.

Who would have thunk <snip> it?

2
0

Re: They're taking over Linux!

"'bout as bad as imagining Margaret Thatcher naked on a cold day."

Don't know, imagine most of the flesh would have rotted off by now.

3
0

Re: They're taking over Linux!

Still, it ain't a pretty picture...

1
0

Re: They're taking over Linux!

I'd rather not imagine that if it's all the same to you.

'bout as bad as imagining Margaret Thatcher naked on a cold day.

https://www.youtube.com/watch?v=HOxeH_OQpFw

There is no amount of money in the world, not even all of it, that could persuade me to click that link.

0
0
gv

"On Linux we’re just another shell"

Not sure I understand why anybody would use this in preference to sh, bash, dash, csh, ksh, zsh, et al.

51
7
Silver badge

Re: "On Linux we’re just another shell"

If they're Windows admins forced to use Linux once in a while?

If I had a Powershell script that needed to be ported to Linux, rather than learn Powershell to port it to bash I'd first try installing Powershell on Linux (when it is polished) to see if it provided an easier way.

10
9

Re: "On Linux we’re just another shell"

"Not sure I understand why anybody would use this in preference to sh, bash, dash, csh, ksh, zsh, et al."

Hah, totally unsurprised by the downvotes, but this was exactly the first question that popped into my head. Sure, bash is a bit byzantine and most others are in declining use etc, but there it is.

Maybe the obvious answer is "because you already know it from windows and you're new to linux" but that's not it. The real answer is that you need both powershell and systemd to convert linux into windows.

16
5
Silver badge

Re: "On Linux we’re just another shell"

It's in the article. Whilst I've never gotten on with powershell it's got an awful lot of nice structured features that make the standard Unix shells looking like what they are - a 1970s solution in need of update.

Imagine doing a http request to 169.254.169.254, grabbing an access key and spawning a worker process. Sure you can do that in bash by calling curl and parsing the result but it's so much neater in powershell.

(I'm now going to get down voted by the MS haters and the cloud haters as well as the Unix greybeards!)

25
7
gv

Re: "On Linux we’re just another shell"

"Those who don't understand Unix are condemned to reinvent it, poorly."

Henry Spencer, in Introducing Regular Expressions (2012) by Michael Fitzgerald

32
6
Silver badge
Joke

Re: "On Linux we’re just another shell"

@qv: "Not sure I understand why anybody would use this in preference to sh, bash, dash, csh, ksh, zsh, et al."

Don't understand all the down votes, oh wait, this is the Microsoft Register :)

8
15

Re: "On Linux we’re just another shell"

As an extremely long time Microsoft hater (back to the day when they abandoned OS/2), I welcome PowerShell on Linux -- especially that it is open source.

This will be another useful way to make it easier for Windows people to support Linux. It is the evil mirror universe version of my approach to dealing with Windows - which is to use cygwin, bash, and ssh.

The ability to have configurable pipe formats is pretty cool too.

14
2

Re: "On Linux we’re just another shell"

But even though Windows admins might be used to PowerShell on Windows, they'll be used to using Windows commands. Linux doesn't use the same commands so those Windows admins are still going to have to learn the Linux CLI commands and all their options, etc, and the sequence they need to be run in, in order to get anything done on Linux.

2
6
WTF?

Re: "On Linux we’re just another shell"

Perhaps you should learn Power shell so you know what the hell the script is actually doing?

5
5
Silver badge

Re: "On Linux we’re just another shell"

@gv = "Not sure I understand why anybody would use this in preference to sh, bash, dash, csh, ksh, zsh, et al."

I suspect it's not about getting people to use PowerShell in preference to bash. There's really nothing to attract Unix/Linux users there. PowerShell isn't really a "shell" in the way that Unix users are used to thinking as it's far too verbose.

Rather, I suspect that it's part of their plan for porting more of their bread and butter applications from Windows to Linux in order to run them as part of their "cloud" product. Supposedly, PowerShell has been knitted into their other server application product lines, which means that they now have a dependency on PowerShell. Porting those server applications to Linux without leaving too many holes requires porting their dependencies as well.

Microsoft is looking to the future, and the future isn't MS Windows.

27
0

Re: "On Linux we’re just another shell"

Because it's an excellent shell system. Consistent, well thought through, object oriented, and works well with dotNet.

Maintaining the Windows NT kernel used to confer an advantage to Microsoft. As the profit drains out of Windows and on-site software, you will see Microsoft first open source the kernel, then dump it because it's millions of dollars in development costs that they can do without. The first step to dumping that cost source is to get all their dev's on GNU/Linux using familiar tools like VS, Powershell and SQL Server. When MS is charging you per second to use their cloud systems, there is no point in stopping the the tidal shift to FOSS operating systems.

3
6
Linux

Re: "On Linux we’re just another shell"

You're in for a nasty surprise, what makes you think that it does integrate well in Linux? This was designed in a Microsoft centric way.

To control an application from powershell you require to have an interface with it provided by the company who made the software.

Also, I wonder what type of Linux sysadmin is going to deploy this on a Linux server to do anything just because someone feels comfortable with powershell syntax.

10
0
Silver badge

Re: "On Linux we’re just another shell"

"works well with dotNet"

Depends on it. So not only does it get to be installed, it drags in an awful lot of other stuff you might not want cluttering up a Linux box.

10
0
Silver badge

Re: "On Linux we’re just another shell"

"Microsoft is looking to the future, and the future isn't MS Windows."

- Is anyone else reminded of Xenix (alternatively, is anyone here old enough too any more)?

- I'm not saying we're going in circles or anything...

10
1
Silver badge

Re: "On Linux we’re just another shell"

>Because it's an excellent shell system. Consistent, well thought through, object oriented, and works well with dotNet.

That may be true but other factors are involved:

1. Open source is pointless unless the community is happy to pick it up and run with it. "Open source but only developed by MS" leaves users just as exposed to fickle business strategies as closed source does. They don't even do their own voip solution for their own phones. What's the chance of them having a vested interest in unix administration?

2. A wrapper for crontab is all very well, but its still a windows wrapper for a unix tool. Who's going to rely on that having a future? Unix people won't - they won't trust powershell to be on all unix systems. Windows people still need to learn the wrapper for cron - a unix tool. Could the skills gap be fixed in a better way by adding a "this is the format of crontab" comment at the top of the crontab file?

3. Different distros do things differently. Does updating /etc/resolv.conf directly mess with how Yast works? Do we think MS is going to keep pace with all the distros and their updates, or will this tool quickly fall to bitrot? The use-case appears to be "administering some bits of unix from windows." I'm not sure "some bits of unix" administration is enough to make the project worthwhile.

4. MS control many of the apps running on Windows servers and they can powershell-ise them. What happens when you don't control the applications? You're back to text output and parsing that using regex's and so on. The point about scripts is that you can edit them and update them to suite changing needs. The point of powershell is to remove that requirement - and that skill - and place it in the hands of the powershell developers. Powershell is a typical windows application. It does what it does well, but extending it at a sysadmin or user level, rather than developer level. is almost impossible. Can you pass powershell objects to something other than powershell? Maybe, but you'll still need the "other" skills, so your net gain is very small.

Of course, if systemd et al is the way of the future, swapping text for binary formats, much of the unix advantage of simple human-readable formats will be lost anyway. Yeah journalctl, I'm looking at you with malice.

13
0
Silver badge

Re: "On Linux we’re just another shell"

"Is anyone else reminded of Xenix"

Now that you've reminded me, yes. What a pity they didn't continue with that line of development, at least as a server OS. Maybe it wasn't old-fashioned enough to catch on with the IT managements of the day.

4
0
Silver badge

Re: "On Linux we’re just another shell"

"Yeah journalctl, I'm looking at you with malice."

There's no other way!

4
0
Silver badge

Re: "On Linux we’re just another shell"

I seem to remember something about Ms envisioning Windows as a client desktop OS only at the time and Xenix was to provide the networking, as it was DOS + windows, this was a sensible vision - where did the madness and egoism creep in? I'm now forced to wonder...

6
1
Silver badge
Alien

What I like most about PowerShell...

...is that it condenses scripting through high level abstraction of something that Microsoft's toner monkeys would otherwise fail to grasp, in yet another new fucking language that I'm expected to learn for no reason other than to accommodate the aforementioned toner monkeys.

12
2
Silver badge

Re: "On Linux we’re just another shell"

@P. Lee - "Who's going to rely on that having a future? Unix people won't - they won't trust powershell to be on all unix systems."

Not just "won't" rely on it, but rather "can't" rely on it. Linux runs on a far greater range of hardware than MS Windows. As a result, core parts of the operating system have to work on hardware and in situations and under constraints that people at Microsoft have never heard of, let alone test or support. Therefore, PowerShell can't be a core dependency for most serious distros. It can only be a non-core optional package, which few people will bother to install.

@P. Lee - "MS control many of the apps running on Windows servers and they can powershell-ise them. What happens when you don't control the applications? "

It will only ever be of interest to companies, such as Microsoft, who already have "powershell-ised" applications that they wish to port to Linux from Windows. These will typically be proprietary "enterprise" applications. If you don't use that application, then there's no reason to install PowerShell.

In other words, don't think of PowerShell as something you would install for its own sake. Rather, it's just something that would get pulled in along with some other application.

7
0
Silver badge
Linux

Re: "On Linux we’re just another shell"

"you need both powershell and systemd to convert linux into windows."

one way to resist (if you're running systemd now):

sudo systemctl enable multi-user.target --force

sudo systemctl set-default multi-user.target

(ignore the warnings and messages)

after that, you'll boot into console mode and need to *gasp* type 'startx' to get the GUI.

you're welcome.

2
3

Re: "On Linux we’re just another shell"

Larry Wall wrote perl years ago to solve the sort of problem you are describing.

5
0
Ogi
Bronze badge

Re: "On Linux we’re just another shell"

I don't know, in my mind when I need to do something like that, I graduate from shell to Perl/Python, and do it there.

Yes, Unix shells are old (although still being refined and developed, so today's shell is not your granddaddies), and some people don't like the design, but to be honest. They do what they say on the tin, and they do it damn well.

I can hack something together in bash with curl to do what you want, but chances are that if I had to do something like that, I would branch out into the above mentioned programming languages, do what needs to be done, and pass it back to the shell.

I don't see a need to shove everything and the kitchen sink into the shell. If I wanted that, I would basically just change my login shell from /bin/bash to /usr/bin/ipython, and have at it.

I see no reason for PowerShell on Linux. It would have been worth for me if it allowed you to run windows powershell scripts unaltered on Linux/Unix, like you can with Python/Java, however I don't get the impression that it works like that.

So, really for windows admins that have to admin the odd Linux/Unix machine and don't want the hassle of learning a Unix Shell. One serious niche, but who knows, maybe it will grow.

8
0
Silver badge

Re: "On Linux we’re just another shell"

Microsoft is looking to the future, and the future isn't MS Windows.

Windows used to have quite a following, before Windows 10. If it's losing popular support now, then methinks Microsoft must bear the blame.

3
0
Silver badge
Meh

Re: "On Linux we’re just another shell"

not used ksh93 network abilities have you ? Limited but there.

Thank $DEITY I leave this borging behind as I approach decommissioning. In older times I used Putty plink to run unix jobs from MS servers in the very few cases where that was required by business process. Felt weird using MSdog to fire off unix commands remotely, but it worked so customer was happy.

1
1
Silver badge
Unhappy

Re: "On Linux we’re just another shell"

Xenix ? recycled last server a decade ago. Compared to the competing offerings at time it was under-rated.

0
0
Silver badge
Childcatcher

Re: "On Linux we’re just another shell"

And the answer is in the title of Mr Spencer's book. PS uses objects, Linux and the older Windows command line use regular expressions. The latter is easier to learn, more intuitive. I have heard Monad lovers go on about how much more powerful it is, but except for things designed specifically to be run by it, I can do anything with CMD that you can do with PS and probably get the job done faster.

So to me the choice ought to come down to which you prefer and the issue I have is that MS is working hard to remove that choice for its Windows using customers.

3
1

Re: "On Linux we’re just another shell"

"To control an application from powershell you require to have an interface with it provided by the company who made the software."

Nonesense. Normal command-line invocations are possible too. If you want to make the effort, it is possible to write a cmdlet that makes the command appear powershell-native, but it is by no means a requirement.

0
0
Silver badge
Windows

@gv

Not sure I understand why anybody would use this in preference to sh, bash, dash, csh, ksh, zsh, et al.

Well, it is true that PowerShell is an extremely flexible tool when it comes to administrating Windows servers. Having the ability to easily access the registry of a remote server or its SSL keystore can be very useful.

Yet that 'remoting' as it's called is also where PowerShell shows its weaknesses. When I'm logged onto a remote server I can't simply start a commandline based text editor to edit remote files. Not because those aren't available, but because PowerShell doesn't fully support this (yet?). Not even running something as trivial as edlin can be used through PowerShell on a remote server: the very moment I start a new process then the output of that process will not find its way to me. It's unsupported!

And as we all know this is completely different for your average Unix-like console together with SSH.

PowerShell has its uses, but not so much in comparison to what you can already do on an average Unix shell.

6
0
Silver badge

Re: "On Linux we’re just another shell"

"If I had a Powershell script that needed to be ported to Linux, rather than learn Powershell to port it to bash I'd first try installing Powershell on Linux (when it is polished) to see if it provided an easier way."

The problem with that is that shells are designed to string together existing ecosystems. Without the ecosystem the whole thing is useless.

1
0
Silver badge

Re: "On Linux we’re just another shell"

"- Is anyone else reminded of Xenix (alternatively, is anyone here old enough too any more)?"

ISTR a Tandy TRS-80 Model 12(??) or 16(??) with a pair of 8" drives built in which ran that. Never saw one in real life thought.

0
0
Silver badge
Pirate

Re: "On Linux we’re just another shell"

" Whilst I've never gotten on with powershell it's got an awful lot of nice structured features that make the standard Unix shells looking like what they are - a 1970s solution in need of update."

It does, until you get neck deep into it and realize it's still full of sharp edges and half-baked ideas. While there are things that make it LOOK like a true programming language, you eventually realize that's just shiny-shiny, and it's really just an overly complicated shell, or worse, just a bunch of loosely bound together common commands with a bit of looping, branching, and variables thrown in. And, in truth, it is relatively restrictive. You can only do the things that Microsoft thinks you need to be able to do, and (mostly) in the ways Microsoft thinks you should do them. At first, you don't notice these walls so much, but get further into it, and they become much more apparent.

It is an improvement over the venerable DOS shell, however. Import-CSV is worth its weight in gold and is the primary driver for using powershell at all, IMHO.

I'm sure the clean-shaven MS fanbois will apply the appropriate number of downvotes to this post. Fire away, guys.

4
0
Silver badge

Re: "On Linux we’re just another shell"

"Xenix ? recycled last server a decade ago."

As recently as that. The last Xenix gig I had was migrating to Openserver which I think was for Y2K reasons.

0
0
Silver badge

Re: "On Linux we’re just another shell"

Why write that in bash in the first place? Write it in Python, Perl, Ruby, C, whatever.

0
0
Silver badge

Re: "On Linux we’re just another shell"

sudo systemctl enable multi-user.target --force

sudo systemctl set-default multi-user.target

(ignore the warnings and messages)

- On my system (Archlinux), all I need do is:

sudo systemctl disable <whatever display manager I happen to be running, currently sddm>.service

after boot, or additional stop command as above and logout, hey presto, console....

Simples..

0
0
Bronze badge

Re: "On Linux we’re just another shell"

> "Larry Wall wrote perl years ago to solve the sort of problem you are describing."

Indeed, I've done a few things in powershell and every one one of them I wish I'd done in perl instead.

4
0
Bronze badge

Re: What I like most about PowerShell...

Well, you don't have to really Learn Powershell if you already know C#, as the scripting is syntactically similar. Also in powershell, as long as you remember it's always verb-noun, and you always remember Get-Help, then you can solve everything.

No-one seems to mention how powerful and useful the help system is in powershell, especially when creating help for your own custom commandlets.

0
0
Bronze badge

Re: "On Linux we’re just another shell"

@ Robert Helpmann??

You are aware that since powershell version 1, you have been able to use any CMD instruction and it runs through powershell. What is really funny though, is that since version 1 of Powershell, if you typed in a Linux shell command, it also worked, providing there was an equivalent feature in windows.

Windows has support Linux command line commands since Vista, in powershell. This means, when it is ported to Linux, get what it already has inside....

0
0

Page:

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

Forums

Biting the hand that feeds IT © 1998–2017