title: Returning an error code from CMD to Powershell
body: <p>I'm working on a Mssql install script and I want to get the results of a silent mssql installation. In my PowerShell script I run this command:</p>
  
  <pre><code>$result = (start cmd "/c D:\SQL2008R2\SQL2008R2\setup.exe /CONFIGURATIONFILE=sqlconfig.ini &amp;&amp; exit 0 || exit 1")
  </code></pre>
  
  <p>Which should return 0 on fail and 1 on pass. Unfortunately, I don't get any output back. Any ideas?</p>