Wow, TFS can be a pain at times.
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.
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
I'm a .NET Software Engineer. Obsessed with Scrum / agile practices, DevOps, Azure... and C# of course
Nant (1) Load testing (1) Visual studio (1) Azure (25) Aws (1) Asp.net (1) Tfs (1) Puppetlabs reports (2) Devops (2) Iis (1) Powershell (7) Arm templates (2) Arm template (1) Azure (9) Arm (2) Powershell (1) Dsc (1) Jekyll (1) Vsts (1) Arm (2)