I have a node js script that can return a string value. I want to return that value and use it in PowerShell script.
I have done
console.log(); to print the output. How to use it in PowerShell script?
The output looks like this:
D:developmentjs-automation>node index.js MyNewProject MyNewProject https://github.com/avadhvashisth/MyNewProject.git
Powershell can capture all the standard output to a string. Make sure you specify the path to your node.exe and include the file extension or Powershell will consider it a command:
$MyOutput = .node.exe index.js MyNewProject
$MyOutput should contain everything returned by node