How to change the computer name and update the owner name for a workspace

As part of the information about a workspace, the version control server records the name of the computer that hosts a workspace and the user that owns the workspace.  If you need to change your computer name or your user name, how do you tell the server to update the workspace information?

The command line, tf.exe, provides two options, /updateComputerName and /updateUserName, on the workspaces command to address this issue.  Note that in version 1 you must use the command line for this.  Also, you may notice that the documentation on MSDN shows that these options do not accept values, but that's a documetation error that will be corrected in the near future.

To update the computer name for workspace, you'll need to run the following command.

tf workspaces /updateComputerName:OldComputerName /s:http://Tfs_server:8080

OldComputerName should be replaced with the name your computer had previously (more precisely, it should be what the server currently has recorded).  Tfs_server should be replaced with the name of your server.

When you execute that command, tf.exe removes the cached workspace entries that use the old computer name, calls the server to tell it the current computer name, and gets the current list of workspaces owned by you on the current computer.

Similarly, you'll need to run the following command if your user name changes (for example, from corpdomaineharris to corpdomainesmith).

tf workspaces /updateUserName:OldUserName /s:http://Tfs_server:8080

OldUserName should be replaced with your user name prior to changing it.

As with updating the computer name, tf.exe uses the old user name to clear out the workspace entries where the owner is the old user name, tells the server to update your user name, and gets the current list of workspaces owned by your current user name.

The server actually stores the Windows SID (security identifier) for your account, so the update call to the server simply tells the server to update its cache with the current user name for that SID.  That also means that if you get a new user ID rather than just changing the name, you won't be able to update the workspace ownership this way.  In that case, you'll have to create a new workspace.

You can find the complete command line reference documentation at

To use /updateComputerName and /updateUserName, you must use the RC or newer release of TFS.

Comments (13)

  1. Eric Charran talks about using settings in Test Projects.

    Buck Hodges shows us how to change the computer…

  2. Paulo Santos says:

    Thanks, mate. You saved a week’s worth of work.

  3. SP says:

    Great one! You saved my life. Thanks!

  4. Nan Mottram says:

    This is fine for it at work but this older person (me) bought a second hand lap top that I cannot get the previous user off of. I have no clue where to get to the command line or your directions would be easier to follow for someone a bit more experienced than I am.

    The reason I am so frustrated is that I cannot even get email on this since it sends from here to old owner. If you have any suggestions, I would appreciate them. My email (personal ) on other computer is

    Nan Mottram

  5. Jon M says:

    Is there a way to update the SID for a user in TFS? I had TFS installed on my workstation at home which isn't in a domain and hence was using local accounts. I got a new hard drive and did a clean install of TFS and Windows. Before I did that I backed up TFS from my old hard drive using the TFS Power Tools. Then I restored to my new installation of TFS. The problem is that the user name is jemiller:1 from when I was using it on my old hard drive and my user name is jemiller. I.e. it added what appears to be a counter variable to the end of my user name. I would like to make it so that jemiller:1 is just jemiller. I'm assuming that this is because of the SID. So, I'm wondering if there is a way to update the SID from what it was in my old OS installation to what it is in the my new installation or if there is some other way to make jemiller:1 just jemiller.

  6. buckh says:

    Jon, sorry for not getting back to you sooner.  There's not an easy way out of this, and it's something we need to address.  If you can restore again, I can give you a way to do it (you can email me at buckh).  Otherwise, it's a limitation that can't be fixed.


  7. Pawan Grover says:

    Thanks for the information.  It was really helpful.

  8. Grigory Cherny says:

    Thanks – helped me a lot!

  9. Mark Valencia says:

    Thanks a lot!

  10. Thomas Thayil says:

    Thanks, that worked for me when I changed cubicles!

  11. Emily Thomas says:

    Any suggestions for updating the workspace when you did not record the old computer name?

  12. Vinay says:


    While updating computer name I'm getting error Unknown command "updateComputerName"

  13. Barbara Ianni says:

    I am the original owner of this computer. I prepared it for my brother. He does not want it. How do I change the Owner Name back to my name?

Skip to main content