rannn505 / child-shell

Node.js bindings 🔗 for shell
http://rannn505.github.io/child-shell/
MIT License
299 stars 71 forks source link

How to send input to ps script user prompts after invoking? #112

Open ericbrumfield opened 4 years ago

ericbrumfield commented 4 years ago

It may just be me, but I'm not seeing a way to send input into the invoked commands with this utility using ps.streams.stdin.write(); as an example. The use case I was stuck on here was when running cmdlet:

Remove-VpnConnection -N "TestVpnConnectionName" -AllUserConnection -Confirm:$false

I'm not a nodejs guru, but in the past I've been able to pass in Yes/No to prompts when using exec/spawn in node via the stdio events, but no events are being raised that I can see. Appreciate any help here.