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.
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