Got into a tricky issue today where customer’s user left the company his machine was formatted, however he kept lock on some TFS version control files which users were not able to check-in or check out.
Installed side kick tool to delete that workspace but since user was not in DC that didn’t help. With admin users, we were just able to see the local workspaces on the machine.
Tried using tf workspaces lock:unlock command with new user as login as old user it wasn’t recognizing but it failed with an error that user doesn’t have collection level permissions on the server, though the user was server admin.
Same happened with tf workspaces delete command.
Tried giving workspace owner name also as parameter but it failed stating that user is not recognizable etc error. Eventually found out that the error while check-in has the bigger name(in this case for e.g. xxxNitishNagpal
Bangalore India). I was just giving Nitish Nagal J. The moment I gave tf workspaces command with correct user, it identified the workspace tied to that user and then with the same full name, I was able to delete the workspace and locked files got
Caution: Never directly delete the workspace from tbl_workspace table in collection or locked file from pending changes and locks tables.
Hope this Helps.
Written and Reviewed by: Nitish Nagpal, Support Escalation Engineer