Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a command which I need to inspect in real time (i.e. see its output in the command prompt MyProgram.exe) and to have a log file for later inspection (MyProgram.exe > log.txt)

How can I make a single instance of the program to write to both outputs?


locked by HopelessN00b Mar 16 '15 at 0:41

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as off-topic by HopelessN00b Dec 5 '14 at 20:47

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Closed due to the high number of low quality, "use this product" answers. – HopelessN00b Dec 5 '14 at 20:47
up vote 10 down vote accepted

Either use one of many tee clones for Windows.

Or if you're using PowerShell, you can use Tee-Object.

maybe you could demo this? – Aaron Hall Dec 5 '14 at 20:46

You want a unix tee clone like this one or this one. I'm sure there are others, but, well, your Google for 'windows tee' is as good as mine.


Not the answer you're looking for? Browse other questions tagged or ask your own question.