Super User is a question and answer site for computer enthusiasts and power users. 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

Does Windows provide the basic tee facility for copying standard input to an arbitrary set of files and then back out to standard output?

I generally download a generic tee program, but curious if something like this exists in powershell or something like that?

share|improve this question
PowerShell is not for everyone so many will prefer to just download tee from – sorin May 5 '10 at 21:47
What about cmd? I mean w/o downloading external tools is there a way to display the output of a program and write it into a file at the same time? – Nils Mar 7 '12 at 13:43
powershell is for everyone from Vista and up – Lưu Vĩnh Phúc Mar 18 at 3:52
up vote 8 down vote accepted

PowerShell sure does, the cmdlet is called Tee-Object. You can also use the alias tee if you're more used to the Unix-like approach:

PS C:\Documents and Settings\Administrator> help Tee-Object


    Saves command output in a file or variable and displays it in the console.


C:>get-process | tee -filepath C:\file.txt

this will send the output to C:\file.txt as well as the console.

share|improve this answer
There are also numerous ports of the original tee to Windows, but those can be easily found by one's favorite Internet search engine. – Joey Nov 23 '09 at 8:39
Right, actually I "carry" a zip file with me from environment to environment; tee being part of that toolkit, but just a fundamentally useful facility I was thinking just HAD to be part of Windows somewhere. – Xepoch Nov 23 '09 at 16:06
The powershell tee isn't quite identical to the "UNIX / GNU" tee you are familiar with. I would very much recommend carrying around the UnxUtils with you and invoking them in this case. – Goyuix Jan 4 '10 at 22:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .