How to get a complete list of workspaces on the server hosting TFS 2012

I work on the server on which TFS 2012 was installed. In addition to TFS 2012, the server also has Visual Studio 2010 and Visual Studio 2012. I would like to know if there is a way to get the list of workspace in the local directory on this server?

What I want to do, I want to run a batch job that uses TF.exe to extract the latest source code from TFS and puts it in a directory. However, when I run the TF.exe command, I always get the error message "Unable to determine the version control server."

I am researching on the Internet and I saw that I need to create a workspace and map the workspace to a local directory, and then I can run TF.exe in this mapped directory.

Actually, I can create a new workspace and create a new mapping myself. But I'm afraid that this may affect some existing settings (since I am completely new to TFS, I don’t know what impact it will have on adding a new workspace and a new display). Therefore, it would be much better if I could see if there is any existing workspace / mapping on this server.

Can someone help or give me advice on my scenario?

+6
source share
1 answer

To do this from the command line, you can use

tf workspaces /owner:* /computer:COMPUTERNAME /collection:http://TFSSERVER:8080/tfs/COLLECTIONNAME

All workspaces on the machine are listed here.

You can then use the workfold command to understand the mappings.

tf workfold /workspace:WORKSPACENAME /collection:http://TFSSERVER:8080/tfs/COLLECTIONNAME

Alternatively, download TKS sidekicks and use the workspace helper to query the server

+7
source

Source: https://habr.com/ru/post/953967/


All Articles