title: Starting .ps1 Script from PowerShell with Parameters and Credentials and getting output from it
body: <p>I think my problem has a simple solution. But now i'm a bit confused. 
  I have Java Code, that starts 1 Powershell Script. This Powershell Script must start other scripts.<br>
  Java -> <br> Powershell.ps1 -> <br>
                            Script1.ps1
                            Script2.ps1
                            Script3.ps1
                            Script....</p>
  
  <p>Script1,2,..etc performing multiple tasks and return String Values. </p>
  
  <p>I've tried 
  Start-Process, Invoke-Command and Invoke-Expression</p>
  
  <p>Assuming script1.ps1 is: </p>
  
  <pre><code>$a = 1+2
  $a
  </code></pre>
  
  <p>Start-Process would work the best for me but im not getting the output:</p>
  
  <pre><code>$arguments = "C:\..\script1.ps1" + " -ClientName" + $DeviceName
  $output = Start-Process powershell -ArgumentList $arguments -Credential $credentials
  $output 
  </code></pre>
  
  <p>$output ist NULL.</p>
  
  <p>Thank you very much!</p>