The command line utility “tfsclean.exe” helps with two scenarios:
- You want to find and delete old worspaces and shelvesets (oder than XX days).
- You want to find and delete workspaces and shevlesets from a certain user
(e.g. when the user left the company)
Caution: There’s no way to recover a shelveset once it is deleted.
Usage:
tfsclean.exe /collection<URI> [/delete] [/maxage:n] [/username:text] [/excludeworkspaces] [/excludeshelvesets]
Required parameters: | |
/collection:<URI> | URI of Team Project Collection (e.g. http://servername:8080/collection) |
Optional parameters: | |
/delete | Required to actually delete items (otherwise it runs in readonly mode) |
/maxage:<number> | Specified the maximum age in days (default is: 365) |
/username:<name> | Only clean items from specified user (e.g. DOMAIN\username) |
/excludeworkspaces | Do not clean workspaces. |
/excludeshelvesets | Do not clean shelvesets. |
(Note: The user needs to have the ‘Administer workspaces‘ and ‘Administer shelved changes‘ permission on TFS)
Download the tool from here:
- For Team Explorer 2010: TfsClean.exe (.ZIP, 4,87 KB)
- For Team Explorer 2012: TfsClean.exe (.ZIP, 9,87 KB)
- For Team Explorer 2013: TfsClean.exe (.ZIP, 13,01 KB)
- Prerequisite: For the versions above, this tool requires VS or Team Explorer to be installed.
- For TFS 2015/2017: TfsToolsSuite.zip (.ZIP, standalone)
–Neno
Hallo Neno,
Danke für den bunten Frühlingsstrauss an Tools, den Du uns da in den letzten Tagen präsentiert hast!
Namaste!
@Fred: Es kommt noch mehr dort, wo diese kleinen Dinger herkommen, die bisher nur ein Schattendasein auf meiner Festplatte leben durften…
Do keep in mind that there’s no way to recover a shelveset once it is deleted (other than from a database backup restored to a server, etc.).
Buck
Thanks, Buck. I updated the post to make that very clear.
Hi Neno,
At my work place we add external Contractor directly in the group but no one what to do the cleanup. I need to clean the permission in the contributor group. Have you done something like that before?
Jean-Rene Roy
SQl Server MVP
Blog: http://www.softdesign.ca/blog/
jrroy@devteach.com
Jean-Rene: What exactly do you want to “clean”? Members of the contributors group? Do you have so many that you don’t want to use the dialog to achieve this? On what criteria would you want to remove them?
-Neno