You are here: Home > Technical Articles > TFS - Useful Commands
Solution 1:
1. Go to Team Explorer (File Menu -> View -> Team Explorer).
2. Open Source Control.
3. Navigate to the file which is checked out.
4. There is a column for user who have checked out the files.
Solution 2:
1. Open Visual Studio Command Prompt.
2. Type "tf status /user:*" and press return.
It will return list of all the files which are to be checked in (including details about changes, user who has checked out the file and local paths).
Solution 3:
You can also modify the above command (solution 2) to get details about the files checked out by a specific user.
For example: tf status /user:a.khan
Please note that you may need to add domain name with the username depending on your settings. For example, /user:mydomain\a.khan
Unlocking files locked by other users can only be done if you have correct permission settings.
1. Open Visual Studio Command Prompt.
2. Type "tf lock /lock:none myweb/
The above command will unlock all files in "myweb" folder.
1. Open Visual Studio Command Prompt.
2. Type "tf msdn" and press return.
Published On: 05 Aug 2009
Team Foundation Server (TFS) - Useful Commands
How to see who has checked out the file
Solution 1:
1. Go to Team Explorer (File Menu -> View -> Team Explorer).
2. Open Source Control.
3. Navigate to the file which is checked out.
4. There is a column for user who have checked out the files.
Solution 2:
1. Open Visual Studio Command Prompt.
2. Type "tf status /user:*" and press return.
It will return list of all the files which are to be checked in (including details about changes, user who has checked out the file and local paths).
Solution 3:
You can also modify the above command (solution 2) to get details about the files checked out by a specific user.
For example: tf status /user:a.khan
Please note that you may need to add domain name with the username depending on your settings. For example, /user:mydomain\a.khan
Unlock files locked by another user
Unlocking files locked by other users can only be done if you have correct permission settings.
1. Open Visual Studio Command Prompt.
2. Type "tf lock /lock:none myweb/
The above command will unlock all files in "myweb" folder.
Want to know more TFS commands:
1. Open Visual Studio Command Prompt.
2. Type "tf msdn" and press return.
Published On: 05 Aug 2009

