Click here to Skip to main content
15,891,859 members
Articles / All Topics

Tidying Up TFS Workspaces on the Server

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
12 Aug 2015CPOL 2.5K   1  
How to tidy up TFS Workspaces on the server

Wow, TFS can be a pain at times.

View Workspaces on Server

To find all the workspaces that are currently on your TFS server, you can fire up “Developer Command Prompt for VS2013″. Get to this by going Start –> Visual Studio 2013 –> Tools.

Type in the following command:

tf workspaces /owner:* /computer:* /server:http://SERVER_NAME:8080/tfs

This lists all the workspaces that are on the server for all users and all computers. I could instantly see the names of people who had left the company and also many duplicates for developers that are still here.

Deleting Workspaces

To remove the workspaces, issue the following:

tf workspace /delete /server:http://SERVER_NAME:8080/tfs/ PC_NAME;UserName

You can query for specific users or computers by changing the * in the first query, this is in case you have a lot of workspaces like I did. I simply changed the query to the username of the people who I know have left the company, and then used the output of this to build the delete query until all were removed.

We now have a nice tidy TFS server… or at least tidier.

The post Tidying up TFS workspaces on the server appeared first on Owen Davies.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United Kingdom United Kingdom
I have been working in software development for over 16 years, during that time I have worn many hats.

I have worked as a Software Engineer, Architect, Agile Coach and Trainer. I’ve created teams, I’ve lead teams, but my main goal is to help teams build great software and enjoy the process.

I help a whole range of businesses – from startups with just an idea who want to build a team to take that idea into reality and FTSE 100 businesses who need to optimise existing teams – I train, mentor and coach them to success.

If you happen to know of anybody who could benefit from results like this, then please go to my contact page and get in touch.

Owen Davies

Comments and Discussions

 
-- There are no messages in this forum --