@aral certainly! Feel free to ping me if you have any questions. I use both PowerShell and node pretty heavily (as well as Windows) so I've been around the issues a time or two!
@aral I'm sure there's reasons you ended up on this result. If you didn't come across it, you can base64 encode a command for PowerShell and pass it in via the -EncodedCommand to not have to worry about multiple levels of quoting through shells. I'm a little worried about the comment on spaces in paths, node should be able to handle them just fine.
A recommendation is to use spawnSync instead and pass in a proper argument array which will work around the need to spawn a shell and quoting issues
I am me. Mostly a lurker and boost content I enjoy and occasionally and up posting, mostly replies more than original content. Have been programming for 20 something years now and am now slowly learning Rust in my free time. Also dabble in Home Assistant and have written a few custom integrations. Author of the PurpleAir integration for Home Assistant.