One of the scenarios that I faced in couple of my cases when someone has a set of files checked out and locked, and the person goes on vacation or is otherwise unavailable. Until these locks are removed, no one else can check in these files.
Someone with the “ Administer workspaces ” permission to undo changes for another user.
One option is to use the TF.exe command – line tool as provided below:
tf undo “$/MyProject/VersionX/Utils/file.cs” /workspace:MyWorkspace;Domain\User/collection:http://server:8080/tfs/Collection/recursive
Another option is to use the Team Foundation Power Tools by following the steps provided below:
1. Open Source Control Explorer.
2. Right – click the item on which checkout is to be undone (or a parent folder of multiple files to be undone).
3. Select Find in Source Control ➪ Status.
4. In the Find in Source Control dialog, leave the Status check box marked.
5. Enter the value for the path as “$/MyProject/VersionX/Utils”
6.Either enter a value for the Wildcard text box or enter a username in the “ Display files checked out to ” text box and select that radio button.
7. Click Find and Select the items to undo and Right – click and select Undo.
8. Click Yes when prompted with “ Undo all selected changes? ”
Content developed by: Nitish