Export and Import Work Item Types

Export and Import Work Item Types from an Existing Project

To customize work item types on an existing project, you use the witadmin command-line tool to export and import the work item type to an XML file. Changes you make to work item types might impact the way the functions of Agile planning tools and My Work. Before customizing a work item type, see Customize the Backlog and Board Pages Using Process Configuration.

Note Note

You can use the Process Editor, a power tool add-in for Visual Studio which you can download and install. Located under the Tools menu, Process Editor provides a graphical user interface for customizing work item types, fields, and other objects. You can use this tool to import and export work item types and modify their definitions. For more information, see the following page on the Microsoft website: Team Foundation Server Power Tools.


  • To perform these procedures, you must be a member of the Team Foundation Administrators group or a member of the Project Administrators group for the project. For more information, see Team Foundation Server Permissions.

  1. To run the witadmin command-line tool, open a Command Prompt window where either Visual Studio or Team Explorer is installed and enter:

    cd %programfiles%\Microsoft Visual Studio 11.0\Common7\IDE

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

  2. Enter the following command, substituting your data for the arguments that are shown here, where CollectionURL specifies the URL of your team project collection, projectName specifies the name of your team project, WorkItemTypeName specifies the name of the work item type to export, and FileName specifies the location and name of the file of the exported type definition. Then choose Enter.

    witadmin exportwitd /collection:http://CollectionURL /p:projectName /n:WorkItemTypeName /f:FileName

       If you are running Windows Vista you might not have permissions set for certain folders. If you try to export the work item type to a location where you do not have permissions set, the registry virtualization technology automatically redirects the exported file and saves it to the virtual store. To avoid this redirection, you can export the file to a location where you have permissions set. For more information about registry virtualization, see the following pages on the Microsoft Web site: Registry Virtualization and Common file and registry virtualization issues in Windows Vista.

    For example, the following command exports the contents of the work item type named Bug defined for the AdventureWorks project to the Bug.xml file:

    witadmin exportwitd /collection:http://AdventureWorksServer:8080/tfs/Collection1 /p:AdventureWorks /n:Bug /f:Bug.xml

    Upon successful completion, the following appears:

    Operation complete.

  • Enter the following command, and then pressing Enter.

    witadmin importwitd /collection:http://ServerName:Port/VirtualDirectoryName/CollectionName /p:projectName /f:FileName

    For example, the following command imports the work item type defined in the AWBug.xml file to the AdventureWorks project:

    witadmin importwitd /collection:http://AdventureWorksServer:8080/tfs/Collection1 /p:AdventureWorks /f:AWBug.xml

    Upon successful completion, the following appears:

    The work item type import has been completed.


    Importing a work item type definition creates a work item type based on the name assigned to the WORKITEMTYPE element in the type definition file. If the name already exists, the import command will overwrite the existing work item type. If the name does not exist, then a new work item type is added to the tem project.

© 2016 Microsoft