All pipelines in powershell are objects, and something will only become text if it has become serialised somewhere along the way (e.g., read/write from disk).
See output from 'netsh'. See use of 'write-output'. Maybe you call an array of strings meangingfully distinct from "text", but it really isn't. You can't use select-object, have to switch to select-string. Have to do an assignment and a get-member or gettype() to know what you are really in for.
Returning multiple objects from a query is a feature, not a bug.
My issue is not the plurality. My issue is that the singular will have a different set of behaviors as indicated by GetType than one. I would have either liked it if a single object was returned as a single element array, or if the language did a better job of implicit array creation if you treat such singular returns as an array.
And no, a cmd script can NOT turn code-signing off if you have UAC turned on
powershell set-executionpolicy bypass currentuser
If you have an enterprise CA, and an AD integrated subordinate, signing scripts is trivial. My workflow with writing powershell involves saving the file in notepad++, running "./add-signature foo.ps1" (add-signature is a 1-2 line script I've got which retrieves my code-signing cert and signs the argument with it) and then running the script. That's it.
First, that's hoops to jump through even assuming the infrastructure setup. Second, no convenient linux tools to generate the ASN.1 structures to sign in non-windows envs.
But, there are things you can do in Powershell in a few lines of code that you just can't do with a shell script without a massive time investment.
That's absolutely true of cmd and vbscript, less so in bash or perl or python on a linux system.
Much of the power of powershell lies in its ability to easily query and interact with WMI objects
WMI in my mind is less desirable than sysfs under linux which provides much the same data. WMI objects aren't very discoverable as they aren't unified under a single root. If you ask me about some data in wmi I have not previously worked with, it;s off to technet forums to search for the answer. In linux, a little ogling of sysfs and I can generally find it without so much as tabbing over to my browser.
not have to worry about people running malicious powershell scripts
Untrue, see above
If someone in the enterprise pushes a dodgy script (either accidentally, or maliciously), I can easily disable it from running, wherever the copies may exist by simply revoking the cert.
Ok, that's the one effective use case of the code signing as implemented today.