Its very likely that its just because i have almost no experience with powershell meanwhile i have now ~4-5 years of dailying linux but i just find the powershell commands to be very cumbersome to use.
They are wayyy to long and descriptive instead of just 2-4 letters, there are 500 different commands for very specific uses instead of 10 tools that you can use and combine todo almost everything and if i recall correctly (my memory might trick me here tho) the errors are far less readable at a first glance and fill the entire terminal for simple things.
CMD meanwhile feels like bash.
Most of my issues with it are probably just skill issues tho since like i said i dont really use or know it alot so i am happy to be corrected :) I mean if every Windows Sysadmin tells me how great powershell is, i cant just assume that they all are wrong (Or maybe its just the only way todo something thats otherwise simple over the terminal on windows, idk)
The verbosity especially in cmdlet names kind of sucks but having everything be an object with properties and methods, vs having to chop up and parse and pipe text is quite nice. I haven't had the pleasure of being a linux admin professionally so I don't have much experience on the linux side.. but just like a really simple example of getting in interface's IP address.. Grabbing a property from get-netipaddress is easier/faster/simpler to me than chopping up text output from ifconfig.
This applies to errors of course, there are a number of properties for an error that you can look at (and use in scripts to handle errors) if the full output is too much or unclear.
Because powershell is weird and obtuse? Or because powershell works slightly different in the terminal va the powershell dev environment? Its a tool most of us use under duress rather than choice
I certainly won't argue that pwsh is even close to perfect, but...obtuse is just about the most unfitting description of powershell. It offers a level of structure and consistency that is - even with all its shortcomings - orders of magnitude above the wild west of the daily reality of the linux cli.
Just because it's the mess we are all intimately familiar with, doesn't make it less of a mess.
"Just because it's the mess we are all intimately familiar with, doesn't make it less of a mess."
I kinda feel like you could apply the statement more to powershell tho.
I just dont see how Remove-Item is superior to rm and thats just the first example that came to mind (Atleast there are aliases for most stuff afaik so i guess its not AS bad).
I also just googled and there seem to be 3-4 different commands (not including the aliases) that do EXACTLY the same thing, atleast the Microsoft article used 1:1 the same description for all of them.
I'm not sure what argument you are trying to make with picking out a single command and vaguely asserting doubt.
It's about having a high degree of systematization and standardization and detailed guidelines around command structure and behaviour. The same with parameter naming and handling. About actually being able to work with typed data at input/output/pipes instead of only raw bytes, with all the benefits that entails (and a "standard library" of cmdlets/modules liberally making use of that). And so on. Having the whole .NET runtime available as a first-class citizen if needed is a nice bonus as well.
rm only removes files and directories right? Remove-Item can be used for any powershell provider, such as environment variables, active directory, certificates, and registry. And of course you can implement your own providers that utilize *-item cmdlets. I don't know that i'd call either superior, or that i'd even say that they're equivalent. rm is a utility for removing files, remove-item is a little more than that.
Most of my issues with it are probably just skill issues tho since like i said i dont really use or know it alot so i am happy to be corrected :) I mean if every Windows Sysadmin tells me how great powershell is, i cant just assume that they all are wrong (Or maybe its just the only way todo something thats otherwise simple over the terminal on windows, idk)