Two Easy Ways to Get All Checked Out Files from TFS 2010First I want to be clear that I am not what you would call “a developer”, but as I work with SharePoint I use Visual Studio from time to time.  That also means you likely use TFS (Team Foundation Server). 

Whether you have full-time or contractors, it’s important to ensure that developers are properly checking in their code.  So how can you get a report of all of the files that are checked out in your solutions?

There are two quick and easy ways to get a report of all the files checked out from your TFS server.  Now the title says TFS 2010, but this applies to newer versions as well.

Method 1 – TF.exe

The first and built-in method to do this isn’t in Visual Studio, but via a command-line utility called tf.exe.  It’s located on the TFS server at:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Tf.exe (32-bit)

It might be already be in your PATH environment variable, otherwise you can add it.  You can review the options for the command you need on MSDN.  Here is the command that I ran:

Tf.exe status /collection:"<project collection URL>" /user:* /recursive > projectcollection.txt


Method 2 – TFS Power Tools

You can be like all the new kids who didn’t grow up running emm386 (look it up) who don’t know what command-line is and use the interface.  However, when I said “interface” I mean you have to install an add-on called TFS Power Tools.  The version depends on your version of Visual Studio / TFS. 

Once installed, it adds a new option in the Find menu.  One huge benefit to using the Power Tools is that you can bulk check-in or undo check-out right from the checked-out files list.  To find a list of checked out files:

  1. Open Source Control Explorer.
  2. Right-click on the highest level that you want to search for checked out files (like the root of the project collection) and click the Find menu –> Find by Status.
  3. You can either search for checked out files for all users or for a specific user in the format <domain\username>.  Click
    , and click Status.
    Find in Source Control in TFS Power Tools
  4. Click Find.
  5. This will give you a list of all the files that are checked out.  From this list, you can select the items you want to undo the checkout, right-click and select Undo.
  6. Click Yes on the follow-up prompt to “Undo all selected changes”.