Comment

Comment by jiggawatts

That's just not true. It feels true to Unix admins trying to do Unix things on Windows and getting frustrated when nothing feels familiar.

Let me quote the article directly: "no SSH"

WinRM is roughly equivalent and superior in many ways. E.g.: It takes quite the effort to produce a report of "some setting or flag" across a fleet of servers with SSH, Bash, Sed, Awk, etc..

Now try this with PowerShell:

    Invoke-Command -ComputerName $varWithListOfServers { Get-Process 'ubiserver.exe' } | Export-Csv 'report.csv'
This will connect in parallel to all the servers in the list (could be thousands!), 32 at a time by default. It'll get all of the process info (memory, cpu time, etc...) for a game server, and then add the source server computer name as an extra column. Dumping this to a valid CSV is a no-brainer.

Put this in a scheduled task and you've got something Excel or Power BI or whatever can pick up and chart, graph, or send to a manager.

Try this with Linux. Seriously. Sit down and do the equivalent: many servers in parallel, batched to prevent overload, server name as an extra column, valid CSV output with proper quoting of quote characters, etc...

Oh, did you notice the lack of authentication rigmarole? The whole thing is secured and encrypted via Kerberos automatically. Copy the equivalent of that too. (Assume you have 10K servers that you haven't manually added the SSH keys of into your local workstation config.)

Put the script in the reply.

PS: I know some Unix people think that brevity is more important than time-to-solution, so to head off that whole argument:

    PS C:\> Get-Alias | ? ResolvedCommandName -in ( 'Invoke-Command', 'Get-Process', 'Export-Csv' )

    CommandType     Name  
    -----------     ----  
    Alias           epcsv -> Export-Csv
    Alias           gps -> Get-Process
    Alias           icm -> Invoke-Command
    Alias           ps -> Get-Process
Ta-da, now it's just as unreadable as Unix:

    icm -CN $s { ps 'ubiserver.exe' } | epcsv 'report.csv'
parent jiggawatts 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton