How to change the owner of a TFS workspace
This occurs when you have created a workspace using one account, a local machine account for instance, and then want to access it via another account, a domain account for instance.
One of the effects of this is that TFS will not let you download the code because the workspace is already in use by another user.
Changing the owner:
You can use the "tf" command line tool to fix the problem. From the Start Menu, open a Visual Studio command window (not the normal cmd window!).
To find out what workspaces are defined for the local development machine, "<DEV-MACHINE>" (e.g. "LVA7210"):
tf workspaces /computer:<DEV-MACHINE> /owner:* /format:detailed
To change the incorrect user name associated a workspace to your currently connected username, type
tf workspace /delete <DEV-MACHINE>;<WRONG-USER> /server:http://<TFS-SERVER>:8080
Where "<Wrong-user>" is the incorrect user, e.g. "TFS\XYZZY" and "<TFS-SERVER>" is the main TFS server, e.g. "18.104.22.168".
You may need to get someone with admin privileges on the TFSn server to help with this.