Witimport and Witexport commands are used to Import\Export WorkItem Types in TFS 2005/2008. Where as In TFS 2010, these applications are consolidated into the WitAdmin console application which will be available in (Drive:\%Program Files%\Microsoft Visual Studio 10.0\Common7\IDE).
If you want to modify a Work Item Type in TFS, first you have to download the Work Item Type using below exportwitd command.
Syntax:
witadmin exportwitd /collection:collectionurl /p:project /n:typename [/f:filename] [/e:encoding] [/exportgloballists]
If you want to export(or)download Bug work item type of TFS Server named “TestTFSServer” in Project Collection “Default Collection” and the Team Project “Demo”. Then, you have to use the below command.
witadmin exportwitd /collection:”http://TestTFSServer:8080/tfs/DefaultCollection” /p:”Demo” /n:Bug/f:”c:\WorkItemTypes\Bug.xml”
You can perform the modification on the downloaded Work Item Types, once you are done with your changes and saved the same. Then, you have to upload (or) the xml to TFS Server using the Importwitd command.
Syntax:
witadmin importwitd /collection:collectionurl [/p:project] /f:filename [/e:encoding] [/v]
To import the same work item type that has exported above to the same server and project, you should use the following command.
witadmin importwitd /collection:”http:// TestTFSServer:8080/tfs/DefaultCollection” /p:” Demo” /f:” c:\WorkItemTypes\Bug.xml”
Below is the List of other Commands that are available in Witadmin Console:
changefield
deactivatelinktype
deletefield
deletelinktype
destroygloballist
destroywi
destroywitd
exportcategories
exportgloballist
exportlinktype
exportwitd
help
importcategories
importgloballist
importlinktype
importwitd
indexfield
listfields
listgloballist
listlinktypes
listwitd
reactivatelinktype
rebuildcache
renamewitd