Command-line tools for TFS

Visual Studio Team Foundation Server 2013

Visual Studio Team Foundation Server (TFS) command-line tools do several types of tasks. Some tasks can be done through a user interface and others are accessible only through the tool. Command-line tool tasks include managing Team Foundation version control (TFVC) objects, work item tracking objects, objects that support Microsoft Test Manager, as well as configuring and managing TFS application-tier servers.

You might need to open an elevated Command Prompt window to run a command line tool, even if you log on with administrative credentials.

Client tools: To access client command-line tools, open a Command Prompt window where either Visual Studio or Team Explorer is installed and enter:

cd %programfiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE

On a 32-bit edition of Windows, replace %programfiles(x86)% with %programfiles%.

Server tools: To access server command-line tools, open a Command Prompt window on the application-tier server where TFS is installed and enter:

cd %programfiles%\Microsoft Team Foundation Server 12.0\Tools

For the required permissions to exercise the command options, see the associated topic.

Area

Client tool

Server tool

Topics

Version control conceptual image

check mark

Manage TFVC:

  • tf: Team Foundation version control commands

    Do nearly all tasks you can do in Visual Studio, and some that aren't supported in Visual Studio.

Conceptual image for working as a team

check mark

Manage work item tracking:

  • witadmin command line tool

    Manage and customize objects, such as work item types, categories, process configuration, and more.

  • TFSFieldMapping command line tool

    Upload or download the file that maps TFS fields to Microsoft Project fields.

  • TFSAdmin ProjectServer command line tool

    Configure the integration of TFS and Project Server.

  • TFSDeleteProject

    Permanently delete a team project.

Test conceptual image

check mark

Manage Microsoft Test Management objects:

  • TCM command line tools

    Run tests, import automated tests, and view a list of test items.

  • tcm bugfieldmapping

    Import and export a mapping file to change the bug type used to automatically file bugs or customize the pick list for resolution states and failure types.

Manage and maintain your deployment

check mark

Manage TFS servers:

  • TFSConfig command line tool

    Manage TFS configuration settings.

  • TFSSecurity command line tool

    Review and manage TFS groups, memberships, and permissions.

  • TFSServiceControl command line tool

    Stop or start all TFS services and application pools.

Configure and manage Lab Management

check mark

Manage Visual Studio Lab Management:

  • TFSLabConfig command line tool

    Manage the lab service.

Q & A

Q: Are there other command line tools that interface with TFS?

A: Yes. Visual Studio Team Foundation Server Power Tools provides companion tools to tf.exe that offer additional version control commands, work item tracking, and team project manipulation. Some commands invoke a graphical user interface. In addition, the power tools provide several user interface tools. Refer to the help content that ships with the power tools for usage.