How to update TFS workspace after computer name changes?

别等时光非礼了梦想. 提交于 2019-12-02 17:15:52
  1. Install Team Foundation Sidekicks. It's free.
  2. Open the Workspace Sidekick, click Search, and select your workspace from the list.
  3. Click the blue computer icon to Update Workspace Computer Name and you're done.
J Brune

I installed Sidekicks. It did not work for this issue, but this did:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE>tf workspaces /updateComputerName:OldComputerName /s:"https://tfsServerName"

I had the same issue, also a VisualStudio.com account.

I've tried what the prompt told me :

Like so :

tf workspaces /updateComputerName:MyOldComputerName

but I got back :

The /collection option must be specified whenever /updateComputerName or /updateUserName is specified.

In order to get the collection name I ran :

tf workspaces

which listed my collections and I got the name of my collection (...myusername.visualstudio.com...)

Then I ran :

tf workspaces /collection:http://myusername.visualstudio.com /updateComputerName:MyOldComputerName

Didn't work as I got this:

TF31002: Unable to connect to this Team Foundation Server: http://myusername.visuals tudio.com/defaultcollection. Team Foundation Server Url: http://myusername.visualstudio.com/defaultcollection.

Possible reasons for failure include: - The name, port number, or protocol for the Team Foundation Server is incorrect - The Team Foundation Server is offline. - The password has expired or is incorrect.

Technical information (for administrator): The remote server returned an error: (404) Not Found.

Then I noticed that I've typed http instead of https, corrected, retried and it worked!

In

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>

run in CMD as admin this command

tf workspaces /collection:https://SERVER_NAME.visualstudio.com/DefaultCollection /updateComputerName:OLD_COMPUTER_NAME

To get this to work in Visual Studio 2017 use the following (new location)

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe workspaces /collection:https://youraccountnamehere.visualstudio.com /updateComputerName:OLD-COMPUTERNAME

Hope this saves someone some time!

Ardalan Shahgholi

Look at this link

Vaccano said :

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

tf workspaces /updateComputerName:REPLCATEOLDCOMPUTERNAMEHERE /collection:REPLACETFSURL

example:

tf workspaces /updateComputerName:DESKTOP-42CLO97 /collection:https://testuserxx.visualstudio.com

VS2017

Open Command prompt and type as shown in below

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE

and type the following code with your credential

tf workspaces /updateComputerName:OldComputerName /s:"https://tfsServerName"

In CMD prompt

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>tf workspaces /updateComputerName:OldComputerName/s:"https://tfsServerName"

You can add new workspace then use vs 2017 delete your previous workspace:

What worked for me was typing

tf workspaces /updateComputerName:MyOldComputerName /collection:"anything".visualstudios.com/DefaultCollection/
Abdul Rauf

Open the visual studio command prompt and type the following command

tf workspaces /updateComputerName:oldcomputername  /s:http://tfservername:port#/tfs

for example

tf workspaces /updateComputerName:abc-PC  /s:http://mytfsserver:8080/tfs

You can run the following command before and after running the above command, this is just to check the workspaces information on your computer.

Remember: run all these commands on client computer (which is renamed) and not on the computer where TFS server is installed.

If user name is also changed then run the following command

tf workspaces /updateUserName:oldUserName  /s:http://mytfsserver:8080/tfs

Hope it will help.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!