Project Edge allows seamless integration of NodeJS and PowrShell.
Just install packages:
npm install edge npm install edge-ps
Create NodeJS application which contains PowerShell code:
var edge = require('edge'); var hello = edge.func('ps', function () {/* "PowerShell welcomes $inputFromJS on $(Get-Date)" */}); hello('Node.js', function (error, result) { if (error) throw error; console.log(result[0]); });
Start application and you’ll get output
PowerShell welcomes Node.js on 05/11/2013 07:14:38
Project Edge also allows integration of NodeJS with other technologies (e.g. Python)
This might also be helpful to folks who need to communicate with external processes on windows using node (i.e. powershell) https://www.npmjs.com/package/stateful-process-command-proxy