9

I want to save ipconfig /all to text file.I am on Windows 10.When I try this in cmd

ipconfig /all | tee file.txt

I got

'tee' is not recognized as an internal or external command,operable program or batch file.

What is Windows alternative for tee?

blahdiblah
  • 5,501

3 Answers3

51

Try redirection. Instead of | tee, use > output.txt e.g.

ipconfig /all > output.txt
Richard
  • 6,420
Greg W
  • 1,123
19

ipconfig /all >>logfile.txt 2>>&1

The >>logfile.txt 2>>&1 will redirect both output stream and error stream to a file called logfile.txt that will be created and stored in the current directory. If there is an existing logfile.txt in that directory it will append the output to the end of it.

8

If you install MSYS2 you can use

$ ipconfig -all | tee file.txt

Note that /all has to be written as -all.

In my case I get:

$ head file.txt

Windows-IP-Konfiguration

   Hostname  . . . . . . . . . . . . : Death-Star
   [..]
mvw
  • 881