title: stdout missing while using psexec in golang
body: <p>On remote machine I just used psexec.exe to run specific command, the output of the cmd is intact while testing in shell.</p>
  
  <p>Only the first line was printed out when submitting the cmd in Golang.</p>
  
  <p>I tried to use winexe on linux platform, but the Symantec anti-virus treats it as PUA, then I turned back to windows platform.</p>
  
  <pre><code>func main() {
    cmd := exec.Command("C:\\Users\\v\\go\\src\\asys\\ss\\psexec.exe", "\\\\192.168.0.64",  "-nobanner", "-accepteula", "-u", "vz", "-p", "1",  "-s", "cmd", "/c", "ipconfig")
    var out bytes.Buffer
    multi := io.MultiWriter(os.Stdout, &amp;out)
    cmd.Stdout = multi
    if err := cmd.Run(); err != nil {
      log.Fatalln(err)
    }
    fmt.Printf("\n*** FULL OUTPUT *** %s\n", out.String())
  }
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>Windows IP Configuration
  *** FULL OUTPUT ***
  Windows IP Configuration
  Process finished with exit code 0
  </code></pre>