How to get a list of pending changes in TFS from the command-line using tf.exe?

Posted: (EET/GMT+2)

 

Team Foundation Server (TFS) includes a powerful command-line tool called "tf.exe" that lets you interact with source control operations directly from the console. One handy task is checking what pending changes you currently have in your workspace without opening Visual Studio.

To list pending changes, open a Developer Command Prompt and navigate to your workspace folder. Then run:

tf status

This displays all modified, added, renamed, or deleted files. You can also specify another workspace or user if you need to check team activity:

tf status /workspace:MyWorkspace /user:username

For a more concise list, use:

tf status /format:brief

You can also see only certain change types, such as edits or adds. Combine this with scripting, and you can easily build reports or automation around pending changes.

This command is especially useful on build servers, remote sessions, or when troubleshooting locked files in shared workspaces. It’s fast, lightweight, and works with both Server and Local workspace modes.