The echo problem is reflective of a larger, longer-term issue with PowerShell, that being that it sometimes aliases PowerShell commands to the names of equivalent Unix commands. That’s done to ease the transition into PS-land for Unix folks, of course. But unless the PowerShell command works exactly the same as the Unix command it’s aliased to — takes all the same arguments, returns all the same data structures and error codes, etc. — you inevitably run into cases where things break because echo or curl or whatever aren’t behaving the way your code expects them to.