there is a tf.exe command that you may want to try.
tf workspaces /updateUserName:OldUserName /s:http://Tfs_server:8080
the tf.exe is located in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
- Proposed as answer by Nicolas VINCENT Monday, May 26, 2014 11:49 AM
You have to log in to the computer with the new user, and then execute the command passing the old user into OldUserName. The workspace owner will be changed to the user who has logged in.
But that command will only work if the user has been renamed (but the SID is the same). If it's a completely different user, it won't work. In that case, I know about two possible options: using a shelveset or the TFS power tools.
With the shelveset option, you simply shelve the entire workspace of the old user and unshelve it over the workspace of the new user.
If the shelveset option doesn't work for you, you can try using the TFS Power Tools (http://msdn.microsoft.com/en-us/teamsystem/bb980963.aspx ), which include the tfpt.exe command line utility. You can try to pend the changes using "tfpt online"; it would be something like the following:
- Create a new workspace for the new user (mapping it but without getting any code into it), and copy everything in your old user's workspace to the new one.
- Open a command prompt, go to the workspace folder and run "tfpt online /recursive". If you have added or deleted files, use "tfpt online /recursive /adds /deletes"
- You should be prompted with a list of changes to be pended. You can compare that list with the pending changes of your old workspace to see if everything is ok. When you're done with the comparison, hit the button "Pend changes"
- You should end with a workspace with (almost) the same pending changes that you had in your old workspace
Hope it helps...