Deleting a work item from TFS 2012 permanently

Today we came across a situation where we had to delete a work item permanently from the TFS.

Found a good article on MSDN but as usual end to end details were not available.

So I helped myself.

Here is what you go to do

1. Open VS command Prompt in Admin mode & navigate to

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE

(This is where I have VS installed on my machine)

2. We need to use a utility tool called “witadmin” that is available at the above location.

(You may want to look for it in Program Files on a 32 bit machine)

3. Build the delete command like this

witadmin destroywi /collection:http://YOUR-TFS-COLLECTION-URL/ /id:3734

command.PNG

A Word of caution: Only Add the Collection URL do not include the project name, else you will get errors saying Not able to connect to TFS. 

Where Id switch accepts the IDs of the work items that you want to delete. You can also provide multiple comma separated IDs.

4. Hit Enter & confirm (type Yes & hit enter again)

5. And that's all, you have your work item deleted from your TFS collection permanently.

Hope this helps someone :)

nJoy!

Ebook Download
View all
Learn
View all