1var spawn = require("child_process").spawn,child;
2child = spawn("powershell.exe",["c:\\temp\\helloworld.ps1"]);
3child.stdout.on("data",function(data){
4 console.log("Powershell Data: " + data);
5});
6child.stderr.on("data",function(data){
7 console.log("Powershell Errors: " + data);
8});
9child.on("exit",function(){
10 console.log("Powershell Script finished");
11});
12child.stdin.end(); //end input