How to Unlock a File in Team Foundation Server

We've all been in the situation before when a developer goes away for a long weekend (usually leaving on Thursday) and they forget to check in a file and ensure the solution builds. Here is how to deal with that in TFS. Unlock the file according to the instructions found here:

https://blogs.msdn.com/rimuri/archive/2006/03/06/544686.aspx

The gist is that running this command will unlock the file:

tf undo /workspace:TheirWorkspace;DOMAIN\TheirUserAccount $/path/to/file

To get a list of workspaces run this:

tf workspaces /owner:DOMAIN\TheirUserAccount /computer:*