Change computer name for a TFS Workspace

Go to VS command prompt and type the following:

tf workspaces

This will provide you with the available Collections. Copy the path (essentially a URL) of your intended collection. Then type the following:

tf workspaces /updateComputerName:"OLD_NAME" /collection:"The URL copied from above"

(exclude the quotes above)


This command run in the Developer Command Prompt for Visual Studio did the trick:

tf workspaces /updateComputerName:MyOldComputerName /s:"http://MyServer:8080/tfs/MyCollection"

It had to be run from the computer I wanted to assign the workspace to (that is how it gets the new computer name.


Vaccano's solution worked for me. It took me several tries to get the TFS URL right, so I thought I'd post it for those of you who are using Microsoft's Visual Studio TFS hosting (currently free for small teams).

From a command prompt on my computer, I first changed to the right directory:

cd c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE

Then I ran the command:

tf workspaces /updateComputerName:OLDCOMPUTERNAME /s:"https://MYCOMPANY.visualstudio.com/DefaultCollection"

It then told me that my new workspace matched the machine name of my new computer name.

Hope the path helps.

Tags:

Tfs

Workspace