Wednesday, March 27

    Remove DevOps Server or TFS On-Prem User Locks

    In the situation where a user no longer works at the company or a file has a phantom lock on a DevOps Server/TFS repository, administrators may undo the lock on the repository or file in question. This guide was created for DevOps Server 2019, but should continue to work on older Team Foundation Server installs.

    1. Install Microsoft Visual Studio from the Official Download Page. Visual Studio 2019 was used in this situation.

    2. Install the matching copy of Team Explorer for the previously downloaded Visual Studio client.

    3. With both tools installed, open Windows Explorer and Navigate to the directory in which Team Explorer is installed.
    a. In our case: C:\Program Files (x86)\Microsoft Visual Studio\2019\TeamExplorer\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer

    4. From here, open an elevated command prompt window. You can do this by typing cmd in the Windows Explorer navigation bar.

    5. In the command prompt window, type tf workspaces /owner:DOMAIN\USERNAME with the italicized fields configured for the specific usecase.

    6. The command line will display a list of available workspaces. Take note of the one in question.

    7. Finally, run the following command to undo the lock/changes on the DevOps/TFS repository in question: tf undo FULLREPOPATHOFFILE /workspace:WORKSPACE;DOMAIN\USERNAME with the italicized fields configured for the specific usecase.

    1 Comment