Redirecting TFS Command Output to Files

Today I discovered that you can redirect the output of Team Foundation Service’s tf.exe command to a file.  I thought that because it displayed dialog boxes as the results of commands that you couldn’t redirect its output to files.  However, commands such as tf history will do just that when you specify redirection, such as:

Of course, if your Visual Studio directory is in your PATH, then you can just specify “tf history…”.  Note that you may also need to adjust your path, as earlier/later versions of Visual Studio will not be stored under the “Microsoft Visual Studio 11.0” directory.


This post was migrated from