title: Get PowerShell script output from C++ App
body: <p>Which is the better way to read output of a PowerShell script using C++ application. Tried with below code but couldn't get the output. It's perfectly ok to execute the same PowerShell script from a console but wanted to get the output of the PowerShell script to use the same in the application.</p>
  
  <pre><code>system("start powershell.exe Set-ExecutionPolicy RemoteSigned \n");
  system("start powershell.exe d:\\callPowerShell.ps1");
  system("cls");
  </code></pre>