I want to save ipconfig /all to text file.I am on Windows 10.When I try this in cmd
ipconfig /all | tee file.txtI got
'tee' is not recognized as an internal or external command,operable program or batch file.What is Windows alternative for tee?
3 Answers
Try redirection. Instead of | tee, use > output.txt e.g.
ipconfig /all > output.txt 4 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.
If you install MSYS2 you can use
$ ipconfig -all | tee file.txtNote that /all has to be written as -all.
In my case I get:
$ head file.txt
Windows-IP-Konfiguration Hostname . . . . . . . . . . . . : Death-Star [..] 7