2 ms·
Powershell falls over in the other direction: the objects flowing down the pipeline are "magic" and can't be serialised, or even necessarily inspected with norm
by pjc50 7y ago
Powershell falls over in the other direction: the objects flowing down the pipeline are "magic" and can't be serialised, or even necessarily inspected with normal tools. For most unix operations you can replace
foo | sort
with
foo > file
sort < file
I like the idea of powershell, but every time I try to do something complicated with it I'm disappointed.
- majkinetor 7y agoThat is some serious BS. Objects can be serialized easily. $WhateverObject | Export-CliXml $WhateverObject = Import-CliXml whatever.xml Most of the time `>` also work. By the way, PowerShell serialization is by orders of magnitude better then anything *nix has to offer as you can use objects from other machine shell just like they exist on your local one. > I like the idea of powershell, but every time I try to do something complicated with it I'm disappointed. I did some very complicated things in PowerShell. For example, check out the script that maintains ~300 mainstream packages on Chocolatey up to date, all in few minutes with bunch of self maintenance features. You need to learn it, simple as that. https://gist.github.com/choco-bot/a14b1e5bfaf70839b338eb1ab7f8226f https://gist.github.com/choco-bot/a14b1e5bfaf70839b338eb1ab7...
- pjc50 7y agoI suppose this is a good demonstration of the best way of getting a right answer being to post a wrong one, as I spent a long time trying to work out how to do this last time I needed it.