TFS Workspace for another user

Have just commenced a new Visual Studio project, and wanting to load all files (from previous engagement) into our Team Foundation Server.

So – needing to generate a workspace (aka working folder).

But – even though there are NONE displayed, I’m getting an error that the folder I’ve chosen is in use :

The path C:\Projects is already mapped in workspace PC123;DOMAIN\USER

Have found a great post about how to use the “TF” command line utility (from Visual Studio Command Prompt) to list any workspaces :

Team Foundation Server – Working folder is already in use 

tf workspaces /computer:PC123 /owner:* /format:detailed

And – sure enough, it looks like there’s another workspace for a different user profile – with the same PC name (PC123).

tf workspaces /computer:PC123 /owner:* /format:detailed /server:http://tfs:8080
Workspace: PC123
Owner    : *ME*
Computer : PC123
Comment  :
Server   : tfs.domain

Working folders:

Workspace: PC123
Owner    : *SOMEONE-ELSE*
Computer : PC123
Comment  :
Server   : tfs.domain

Working folders:
$/AAA: C:\Projects

Not sure how/why this has happened – perhaps a duplicate PC-NAME ?

Anyway – here’s the command to REMOVE the baaad workspace – clear it out all and start again.

tf workspace /delete PC123;other-user /server:http://tfs:8080

A deleted workspace cannot be recovered.
Workspace ‘PC123’ on server ‘
http://tfs.8080′ has 0 pending change(s).

Are you sure you want to delete the workspace? (Yes/No)

Got a permission/security error now – will have to go ask the administrator :

TF14044: Access Denied: User DOMAIN\*ME* needs the AdminWorkspaces global permission(s).

More Info :

10 thoughts on “TFS Workspace for another user

  1. Igor Kikena April 14, 2010 / 5:15 am

    Thanks for the post; it resolved the issue when we moved the tfs to a new server. Make sure user has a tfs console admin permission, tfs will return “Unathorized” error otherwise.

    • msj August 9, 2010 / 5:16 pm

      thanks, it solved my problem

  2. Giray Garan December 29, 2010 / 9:16 pm

    Thanks for the solution, it helped a lot.

  3. Ramone Hamilton January 29, 2011 / 1:20 am

    In my case the answer was to add the project workspace after the /tfs and that fixed my problem.

  4. Amanda Myer July 22, 2011 / 11:02 pm

    Thank you! This was exactly my problem, and it worked perfectly.

  5. ateam December 2, 2011 / 3:38 am

    thanks!!! it solved my problem 🙂

  6. Bryan December 16, 2011 / 7:08 am

    This is what I needed, thanks! And thanks for finding this for me, Bing (first hit).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s