0

Below is a PowerShell function:

function ReturnSomething {
    return 42 
}

How can I get this PowerShell return value (42) by using JScript?

Bond
  • 16,071
  • 6
  • 30
  • 53
Hui Fei
  • 15
  • 3
  • Some context would be useful here. Why do you need to access this from JScript? What are you trying to achieve? – Kev Aug 04 '15 at 03:28
  • Looks like this is a duplicate of http://stackoverflow.com/questions/10179114/execute-powershell-script-from-node-js. – Alexander Obersht Aug 04 '15 at 05:59
  • Is this maybe what you're looking for.. http://stackoverflow.com/questions/10179114/execute-powershell-script-from-node-js – Shovers_ Aug 04 '15 at 08:44
  • @AlexanderObersht : This may looks like duplicate but require() and spawn() are not part of standard JavaScript. require() and spawn() are Node.js functions. What i want is just using standard JavaScript function to get the return value from powershell. – Hui Fei Sep 01 '15 at 07:28

0 Answers0