OK, finally I found something useful on MSDN. You must use witadmin
Open the VS2010 command prompt and get the following categories:
C:\Users\Administrator\Documents>witadmin exportcategories /collection:http://win-gs9gmujits8:8080/tfs/defaultcollection /p:"My Project Name" /f:categories.xml
This MSDN article then explains the syntax of the XML category file. I added my type of custom work item as follows:
<CATEGORY refname="Microsoft.RequirementCategory" name="Requirement Category">
<DEFAULTWORKITEMTYPE name="User Story" />
<WORKITEMTYPE name="My Custom Work Item Type" />
</CATEGORY>
reimport witadmin:
C:\Users\Administrator\Documents>witadmin importcategories /collection:http://win-gs9gmujits8:8080/tfs/defaultcollection /p:"My Project Name" /f:categories.xml
.