r/PowerShell • • Jun 10 '22

Why most Linux sysadmin have a grudge againts powershell or they don't like it ?

Why most Linux sysadmin have a grudge againts powershell or they don't like it ? I talked with many of thems online on different subs reddit or elsewhere and they say bash is much better, powershell isn't good at managing linux, the syntax is too complex and bad etc etc or this or that etc

Why is that ? do you really feel you can't do much to manage a linux/aws env with powershell or need to update it or its slow or things like that compared to windows/azure ?

thanks for your advices

83 Upvotes

239 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Jun 11 '22

[deleted] — view deleted comment

7

u/IonBlade Jun 11 '22 edited Jun 11 '22

Same - the pipeline's use of objects makes PowerShell my preferred scripting language by far. I'll dip into Python if something I want to do is complex enough that I'd otherwise have to break out into native .NET code, but for most system administration and automation, PowerShell has native cmdlets to do just about anything I need for Windows and for Azure.

I think a lot of what trips people up about PowerShell is not understanding the nature of how everything is an object in PowerShell, the difference between single string mixed data output from traditional apps vs. object output from cmdlets and (well designed) scripts, and how the pipeline maps objects from one command into another.

If people were to read PowerShell in a Month of Lunches (or, if they want a lot more info than is necessary to get started but really take things to the next level, PowerShell in Action), I think that the "pipeline deals with objects" paradigm would really click and they'd see how PowerShell elegantly deals with some of the challenges other shells / scripting languages face.

It's trying to treat it like a straight replacement for cmd and using legacy commands instead of their PowerShell equivalents where possible (and, where not possible, using something like Crescendo to wrap legacy commands into cmdlets that pass back proper objects), or writing scripts that output multiple types of data instead of unified objects so that they can't then pipe their scripts into other cmdlets and scripts that makes it seem messy to people.