title: Run VBS from powershell and capture the output
body: <p>I have the following vb script code in the .vbs. I want to call the .vbs via powershell and capture the output of var1, var2 &amp; var3 in the powershell.</p>
  
  <pre><code>public function GenerateResponseFile()
  
      Dim objServiceLogon 
      Dim var1
      Dim var2
      Dim var3
  
      var1 = ""
      var2=""
      var3=""
  
      set objServiceLogon = CreateObject("DSServiceLogonCOM.CoServiceLogon")
      objServiceLogon.DSGetDetails "ABCSVC", "ABCDE", var1, var2, var3
  
  End function
  </code></pre>