Find all locked files in TFS

TheSean picture TheSean · Jun 25, 2009 · Viewed 16.1k times · Source

I would like to see all files that are locked. so far, I've only found to use tf.exe status and look for anything with '!' because they are not reported as "lock, edit" as they are in the UI. Any ideas? thanks.

Answer

Richard Berg picture Richard Berg · Jun 25, 2009

If you have the power tools installed, it's a one-liner:

tfstatus . -r -user * | % { $_.pendingchanges } | ? { $_.islock } | select -unique serveritem

If you prefer GUIs to scripts, try TFS Sidekicks.