Hacker News new | past | comments | ask | show | jobs | submit login

> Try this with Linux. Seriously. Sit down and do the equivalent: many servers in parallel

On my phone so not going to type the full command line out ostensibly it would be:

  xargs ssh ‘ps process-name’
I’d need to pull the man pages up to double check which flags you’ve specifically requested. But the above is the general gist of it.

——

I think it’s pointless to compare such granular features side by side though. For every microscopic thing Windows better Linux will have others it does better too. And visa versa. It’s the overall administration at a higher level I’m more interested in:

How long does it take to go from a new requirement to a deployed service? How easy is it to automate? To adapt? To scale? To fix? Or even forget fixing entirely and just run as a fleet of ephemeral instances.

Windows can and does support everything Linux does too. But Linux is just generally easier to work with (in my 30 years of experience managing both).

I wouldn’t say Linux is the peak of UNIX-like systems either though. But that’s a whole other argument for another day :)




> But the above is the general gist of it.

It's not even remotely the gist of it. The output of that is formatted (pretty-printed) text, not CSV. You won't know which computer the output came from. You can't use this output in any meaningful way. It's not useful to the business.

ssh can't connect to multiple servers at once (other tools like multissh can). However, most such tools aren't designed for and aren't capable of scaling up to a thousand or more servers.

Windows PowerShell and WinRM can, yet people like you just blindly dismiss it, assuming that it "must" be worse than Unix/Linux, since everyone knows that Windows doesn't even have a shell!

To quote the original article: "there was nothing to lean back on: no shell"

Windows has a shell, the author of the article just wasn't aware of its existence, let alone its comparative feature set.


I'm well aware of the existence of powershell and CMD, such things are not a real luxury when you're limited to whatever Windows provides you with as utilities as opposed to the astonishingly wide plethora of commandline utilities available else where (where everything is a file and is easy to read, parse, filter, save-).

Windows 2012r2 came with Powershell 4.0, which I'm sure you'll agree was limited in ways that bash is not, since bash is a collection of utilities and doesn't require deep integration with the platform to function.

For example in your example above you use 'Export-Csv', but that was introduced in Powershell 7.0

Am I saying that it's not possible? Not really, powershell can probably do everything I need it to, but it's not as simple as `ssh user@host` and I'm talking in a way that feels native to the system. It requires a paradigm shift in thinking that most of our developers didn't embrace and discoverability is just lower there anyway.

Claiming that winrm is better than SSH is... just the most absurd thing I've heard this year.

The main reason that I got annoyed with Windows though is not the eggregious license cost- it wasn't that it used an enormous amount of resources- the documentation was really nice!

It was that my iteration times on toying with things went from 5 minutes to 25 minutes in the minimum, that doing any kind of exploratory work meant near certainty that I'd be RDP'ing.

This is not a "I hate windows" rant, but the defensive position you have taken here is frankly unpaletable. Windows has it's strengths, and perhaps I am not the person to charter a course to a fantastically well designed "Windows-centric" solution to problems -- but fuck, it worked honestly and it worked better than any of the Windows admins in Ubi could have mustered. Maybe that's a statement about the general competence of windows admins or just the ones at Ubi, I don't really know.

But Windows is a poor fit for dynamic server workloads such as those. The only reason it was chosen was because the game was developed on Windows and against Windows APIs - some of which were even better than Linux ones at the time, like IOCompletionPorts, which I have extolled virtues upon - rewriting the software to work on Linux would have been a hugely time intensive process. That decision cost Ubisoft literally millions of euroes and was a decision that was later reversed- after I left.

So I am not the blame for that.


Export-Csv was introduced in PowerShell v1.0: https://social.technet.microsoft.com/wiki/contents/articles/...

> but it's not as simple as `ssh user@host`

It is literally that simple. Nay, simpler, because authentication is automatic and secure:

    Enter-PSSession 'hostname'
Oh, I'm sorry... too verbose and readable.

    etsn 'hostname'
> since bash is a collection of utilities[1] and doesn't require deep integration with the platform to function.

You're also unaware of just how elegant PowerShell's extensibility model is. It runs circles around traditional shells, because you can whip up a new "native" command in just minutes, but with features that would take a week of C programming against the Unix byte-oriented pipeline.

The first time I saw something like this, it blew my mind:

    Import-Csv 'serverspec.csv' | New-VM
I wrote some spectacularly complex scripts in bash, and it always felt like digging through dirt, looking for nuggets of gold that everyone promises is there, but I just can't find it.

[1] Those utilities are hilariously inconsistent not just between each other, but between distros and even distro versions. E.g.: SSH is so easy, right? Okay, write me a script that can create a sudo-enabled user and install an SSH key for them on every popular Linux made in the last decade. Include Redhat, Ubuntu, Amazon Linux, and whatever else is reasonable. Three "Linux admins" failed at this task, and I had to resort to using ChatGPT and then fixing up the result by testing it against a dozen VMs that took me a day to spin up.


> It is literally that simple. Nay, simpler, because authentication is automatic and secure:

You keep saying that as if there’s no such thing as secure automatic authentication on SSH yet people have been doing exactly that since before AD was even a thing.

> Three "Linux admins" failed at this task, and I had to resort to using ChatGPT and then fixing up the result by testing it against a dozen VMs that took me a day to spin up.

You do realise that you can get bad Linux sysadmins as well as bad Windows administrators?

Plus it’s not really fair to compare managing different distributions to managing a Windows (unless you’re counting Windows 95 and CE as part of your fleet). Most businesses standardise on one Linux distro (or BSD flavour) and only diversify from that if that absolutely have to. It’s not because Linux is harder than Windows. It’s because managing multiple different core stacks is harder regardless of whether that’s Linux and Windows. Or Linux and BSD. Or Windows 95 and Windows XP. Or different base distributions of Linux.

The first rule of managing large fleets of servers is homogenise as much of it as you can.


This is a great discussion from everyone! I have learned a lot about Powershell here, so thank you!

That said, the comparison to a homogenous windows env and a mixed flavor linux environment is disingenuous. Using multiple flavors of linux is just multiple OSes, of which Windows would be another. The best advice here is to stick to one flavor of linux, which should be possible because there are no licensing fees!


There is an often overlooked downside to “options”: it means that even well-meaning people will pick inconsistent things unless ruthlessly forced into compliance.

Single-choice vendors like Microsoft or Apple remove this variability, which is a big benefit at the scale of large enterprise or “entire ecosystems”.

Linux is too flexible, and the inevitable consequence of this is that I have customers that each have a dozen incompatible variations in production.

Even if each customer had precisely one version of one distro, my scripts wouldn’t be safely portable between them if they don’t happen to pick the same distro!

I’ve got decade-old complex PowerShell scripts I’ve reused across a dozen unrelated customers. That’s a significant benefit.

So the comparison is fair.


People do standardise on a distro within companies though (I made this point to you elsewhere too the last time you claimed otherwise).

And it’s not like Microsoft doesn’t change things around between different releases of Windows. I’ve ran into just as many compatibility issues with edge case software between different versions of Windows as I have with Linux. The key is just understanding the base of your OS as well as your software. This is as true for Windows as it is Linux.

And I have Bash scripts written in the 90s, before Powershell was even a thing, that still work now. In fact one of the biggest complaints about POSIX is the age of the specification. So it’s strange that you’re talking about Powershell as if it’s unique in its compatibility promise.

I’m honestly questioning just how much experience you have in this field because you talk as if everyone misunderstands Windows yet then go on to make the exact same misconceptions about Linux (and POSIX in general).


> It's not even remotely the gist of it. The output of that is formatted (pretty-printed) text, not CSV. You won't know which computer the output came from. You can't use this output in any meaningful way. It's not useful to the business.

You can add all of that easily. Printing hostnames or turning text to CSV isnt a hard job on any computer. I was doing this in the 90s on Windows, years before Powershell. And on pre-OSX macs (think System 8 and 9) connected via AppleTalk. So modern Linux systems are clearly not going to struggle in that regard.

And you’re now just doing exactly what you criticised the author for: making up bullshit requirements based on what you’re familiar with and then using that as some lame excuse to call everything else garbage.

> ssh can't connect to multiple servers at once (other tools like multissh can). However, most such tools aren't designed for and aren't capable of scaling up to a thousand or more servers.

You’re making distinction that doesn’t exist. It doesn’t matter if you’re spinning up multiple SSH sessions from one program, or multiple programs each with a singular SSH session. It’s still the same number of outbound network connections (and likely same number of processes too).

What matters is how those connections are managed. And the code I exampled does run those connections in parallel.

> Windows PowerShell and WinRM can

Bash can. It just needs to call a process. Just as PowerShell is calling a process to do it.

Saying SSH cannot whereas Powershell can is comparing apples to oranges. SSH isn’t itself a shell, it’s a secure client/server protocol that allows you to run remote code inside a pseudo-TTY. Generally that would be a shell, but it doesn’t have to be.

(Source: I’ve written multiple shells for both Windows and Linux over the years)

> yet people like you just blindly dismiss it,

That’s not what I did. You’re now making assumptions about me. Ironically “blindly dismissing” my comments in the process.

> assuming that it "must" be worse than Unix/Linux,

I dont need to make assumptions. I have a hell of a lot of experience managing Windows systems. 25+ years in fact.

I’ve also written plenty of server side software for Windows too. And network enabled Windows malware (pre-NT4 college network. I mostly just used it to siphon off other peoples quotas from the college ISDN line. But it taught me enough to earn a career in IT)

> since everyone knows that Windows doesn't even have a shell!

Literally no one said that outside of the article.

Windows clearly has several shells: explorer.exe, cmd.exe, Powershell. Plus lots of frontends for remote services via RPC.

I also credited RDP as being excellent too.

> To quote the original article: "there was nothing to lean back on: no shell"

I’m not the author of that article so I don’t really understand why you’re using that to prove a point about my own ignorance.

> Windows has a shell, the author of the article just wasn't aware of its existence, let alone its comparative feature set.

We aren’t talking about the article though. We were talking about your generalised point that Windows is easier to administer than UNIX-like platforms.

If truth be told, I stopped reading the article after about 3 paragraphs because it was pretty obvious that it wasn’t a well thought out piece. But that doesn’t mean I agree with you any more than the author. You’re both at the extreme opposite ends of reality.


> Printing hostnames or turning text to CSV isnt a hard job on any computer.

It is actually shockingly difficult.

Less talk, more script source, paste below please.

Do test it first though, several people have submitted hilariously incomplete, invalid, or partial solutions.


> It is actually shockingly difficult.

No it isn’t. The problems you describe are literally what the Unix command line was invented to solve, way back in the 70s. And what every other pipe-supporting command line shell, PS included, has been inspired by since.

If you want to talk about which shell you personally prefer writing scripts in, then that is a different matter. I have zero issue with people preferring Powershell (heck, Linux can run PS these days). I even wrote my own shell because I felt I could do better than Bash. But don’t make bullshit up like “Linux can’t print host names nor CSV” when that’s basically the MVP for any command line interface.

> Less talk, more script source, paste below please. Do test it first though, several people have submitted hilariously incomplete, invalid, or partial solutions.

I honestly don’t see why I should bother. I’m on my phone, cooking breakfast and playing with my kids. And it’s pretty clear you’ve already made your mind up. So I don’t see why I should give up family time to win an argument with a random internet commentator who’s clearly never going to get anything beneficial from the exchange anyways.

The fact that you don’t understand how ssh nor xargs work just demonstrates that you’re not in position to make these kinds of comparisons in the first place.

So take my word for it or don’t. I don’t really care any more. But I’m not going to interrupt morning and fire up a laptop just to write a script that you’ll instantly dismiss for whatever arbitrary and biased reason you dream up next.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: