On-Prem TFS to VSTS Migration – Helpful Commands


If your company/Team is planning to migrate on-Prem Team foundation Server (TFS) collection(s) to Visual Studio Team Services (VSTS), VSTS team have published documentation (Here) to get started on the process.

If you are already in process or getting started to move on-Prem TFS collection(s) to VSTS below are some of the commands which I found very useful and convenient to expedite the process.

A TFS Migrator tool developed by the VSTS team helps migrating on-Prem TFS data to VSTS. The tool can be downloaded from here

Running the TFSMigrator tool from remote (other than Application Tier) machine:

Note that you still need required permissions to run the tool.

o   In command prompt navigate to TFSMigrator tool directory

o   Execute below command (Update the collection URL and Database server name)

TfsMigrator validate /collection:CollectionURL /connectionString:”Data Source=DatabaseServerName;Initial Catalog=Tfs_Configuration;Integrated Security=True”


Based on the validation result (The validation result file will be available in the TFSMigrator tool directory), you may have to make changes in various files to get the collection in the state, before it can be migrated to VSTS. Always, always test these changes on non-production/sandbox environment to avoid possible impact to the production user(s)/data.

“witadmin” application used in below commands generally installed with Visual Studio and is available

For Visual Studio 2015: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE

For Visual Studio 2013: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE

Import/Export work item definition file

witadmin exportwitd /collection:CollectionURL /p:”TeamProjectName” /n:”FeatureRequest” /f:C:\Temp\FeatureRequest.xml

witadmin exportwitd /collection:CollectionURL /p:”TeamProjectName” /f:C:\Temp\FeatureRequest.xml


Import/Export work item categories

witadmin exportcategories /collection:CollectionURL /p:”TeamProjectName” /f:C:\Temp\categories.xml

witadmin importcategories /collection:CollectionURL /p:”TeamProjectName” /f:C:\Temp\categories.xml


List/Export/Import link types

witadmin listlinktypes /collection:CollectionURL

witadmin exportlinktype /collection:CollectionURL /f:O:\temp\Linktype.xml

witadmin importlinktype /collection:CollectionURL /f:O:\temp\Linktype.xml
Export/import Process config file

witadmin exportprocessconfig /collection:CollectionURL /p:”TeamProjectName” /f:C:\Temp\ProcessConfig.xml

witadmin importprocessconfig /collection:CollectionURL /p:”TeamProjectName” /f:C:\Temp\ProcessConfig.xml


I will be keep on updating this post based on the new learning(s).

Comments (0)

Skip to main content