Answers for "javascript execute powershell script"

0

javascript execute powershell script

var spawn = require("child_process").spawn,child;
child = spawn("powershell.exe",["c:\\temp\\helloworld.ps1"]);
child.stdout.on("data",function(data){
    console.log("Powershell Data: " + data);
});
child.stderr.on("data",function(data){
    console.log("Powershell Errors: " + data);
});
child.on("exit",function(){
    console.log("Powershell Script finished");
});
child.stdin.end(); //end input
Posted by: Guest on March-22-2020

Code answers related to "javascript execute powershell script"

Code answers related to "Javascript"

Browse Popular Code Answers by Language