how to remove TFS workspace mapping for another user

后端 未结 9 1483
梦如初夏
梦如初夏 2020-12-04 19:13

I am using Visual Studio 2010. Some months back I was using some \'ABC\' TFS user to connect to TFS and mapped some folders on my local drive. Now my previous user \'ABC\' i

相关标签:
9条回答
  • 2020-12-04 19:32

    1.First we will check the list of workspaces from VS 2015 Developer command prompt,

    Ex - tf workspaces /owner:*

    2.Now we will get the xml format from VS 2017 Developer command prompt which will have ‘owner id’ for the particular workspace,

    Example 1 - tf.exe workspaces /owner:* /computer:ComputerName /collection:https://YOUR-TFS-URL.visualstudio.com /format:xml

    3.We can now delete the workspace for the particular user,

    Example 1- Tf workspace /delete ComputerName;email@email.com /server:"https://URL.visualstudio.com"

    OR

    Example 2 - Tf workspace /delete ComputerName;1e178c77-bb8b-6f05-bf99 /server:https://URL.visualstudio.com

    (Where 1e178c77-bb8b-6f05-bf99 is ID of the workspace which you get from Step 2 XML format)

    4.Again we will check the list of workspaces from VS 2015 Developer command prompt,

    Ex - tf workspaces /owner:*

    0 讨论(0)
  • 2020-12-04 19:37

    I had the same issue that after deleting the workspace using tf delete command, I was getting the error that the workspace was already mapped! Then I found out tf delete workspace command leaves the job incomplete barbecues you have to also delete it from the cache manually as was suggested here:

    https://community.dynamics.com/365/financeandoperations/b/dynamicsaxinsightbyanas/posts/d365fo-the-path-is-already-mapped-in-workspace

    0 讨论(0)
  • 2020-12-04 19:41

    You need to get your TFS administrator to delete the workspace if you have no access to the account.

    You may be able to do it by calling "tf workspace" with the explicit user specified, but you need "manage other users workspace" permission. TF Sidekicks uses the same commands so would require the same permission. It is a TFS admin productivity tool.

    https://msdn.microsoft.com/en-us/library/y901w7se(v=vs.100).aspx

    You can use:

    tf workspace /delete "WORKSPACENAME;PREVIOUSUSERACCOUNT"
    
    0 讨论(0)
  • 2020-12-04 19:44

    First of all you need to install TFS Sidekick (you can download it from http://www.attrice.info/cm/tfs/) In installation phase choose Integrated with IDE mode

    Then a new menu will be added to Visual Studio as below

    Menus -> Tools -> TeamFoundation Sidekick

    enter image description here

    Then open workspace sidekick Search for the 'ABC' user and then you can delete his workspace

    enter image description here

    0 讨论(0)
  • 2020-12-04 19:47

    If you have administrative rights to the collection you can use the TF command located in the Visual Studio\Common7\IDE directory to do this without having to install another tool.

    First list the workspaces associated with the user:

    TF workspaces /collection:"http://tfsserver:8080/tfs/collection_name" /owner:owner_id

    This will return the list of workspaces owned by the user and computer they are associated with

    To delete a named workspace:

    TF workspace /delete workspacename;owner_id /collection:"http://tfsserver:8080/tfs/collection_name"

    0 讨论(0)
  • 2020-12-04 19:47

    Steps to delete workspaces from the TFS server:

    1. Open Visual Studio Developer Command Prompt.

    2. Goto Program Files (x86) folder, depending on the installed visual studio select "Microsoft Visual Studio 12.0" folder. Here this I have selected it because I am having Visual Studio 2013 installed on my machine. Add this path in the command prompt. Add like "cd C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE"

      Note: If you have an access of the TFS server from the network then you can try it from any machine where Visual Studio has been installed or from the same TFS machine server if it has Visual Studio there.

    3. Check a list of workspaces under specific collection. Type below command to get the workspaces under one collection.

      cd C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf workspaces /server:http://{TFSServername}:8080/tfs/{CollectionName} /owner:*

      • In the above command replace {TFSServername} this with your TFS servername or the Server IP.
      • In the above command replace {CollectionName} this with actual TFS Collection Name.
    4. How to remove workspaces under specific collection. Check below command for the same.

      • tf workspace /server:http://{TFSServername}:8080/tfs//{CollectionName} /delete “{workspacename};{owner}”
      • Replace {workspacename} this with "Workspacename” which is there in the list of workspaces.
      • Replace {CollectionName} this with TFS Collection Name.

        E.g. tf workspace /server:http://{TFSServername}:8080/tfs//{CollectionName} /delete {Enter Exact Workspacename};{Enter ExtactOwnerName}

    0 讨论(0)
提交回复
热议问题