Deleting work item in TFS using Visual Studio 2010

As I was setting up TFS (Team Foundation Services) for my upcoming SharePoint project, I created few work items such as Tasks, Sprint Backlog, Bugs etc. also created custom fields and values within them. To test these items, I created a few test work items before moving it to live. Now, I wanted to get rid of the test work items I created before I could log live data in it. So here comes this post, where I would write on how we can delete work items from TFS. So, first of all, there is no simple tick and delete UI from Microsoft which does so. Microsoft recommends using command line to delete the work items. There are some free tools available through few of the sites, but I prefer deleting using command line. Follow the steps below:
  • Open Visual Studio Command Prompt by navigating to Start > All Programs > Microsoft Visual Studio 2010 > Visual Studio Tools
  • Note down the IDs of the work items you want to remove from the TFS
  • Within the command prompt type the below syntax:
witadmin destroywi /collection /id:,,


Note: For noting down the IDs of the work items you can run a query that has ‘test’ in the Title field, provided you have entered test while your testing.

Resetting Sync databse within SharePoint

Resetting Sync database will delete the database completely with all the values in it.
I think one should reset the sync database as the last thing when all troubleshooting tricks provide no result. Only consider resetting when: 
  • Your import user profile connection is fetching details from AD but they cannot be seen on SharePoint
  • Similar scenario with export connections, so you want to push changes back to AD but you don’t see any changes on AD
  • You have modified settings on your FIM Client manually 

Here is a very nice article on resetting the sync database you should follow before considering a  reset:
PS: The User related information such as Profile Pictures, About Me etc. resides in Profile DB and the Social DB, these information will be safe as you do a reset of your Sync database