Quick Response Sample – Command line utility to manage Team Foundation Server Teams and Users
Quick Response samples provide information directly from Visual Studio ALM Rangers working with the Microsoft Visual Studio Product Group, in response to feature gaps to supplement the product and knowledge base information.
The Visual Studio and Team Foundation Server VM Factory automation team, working on the Visual Studio Readiness “Gig” Hands-on Lab (HOL) prerequisite setup automation, required a command line utility, such as TFSSecurity.exe , to add Teams and Team members to a Team Project. Investigations highlighted that in Visual Studio Team Foundation Server 2012 RC, a command line utility with the feature to manage teams and their members does not exist. A feature gap !
Team Foundation Server has extensive support for Teams and Team membership management through the object model. You can build your own Teams administrative command line utility, using the ALM Rangers oob_TfsTeams sample solution, which you can download from Supporting Guidance and Whitepapers, in the Quick Response download package.
The sample is based on using the Team service which an extension on top of the Identity Management Service (IMS) in TFS. Refer to Team Foundation Server Architecture for more information on these services.
To use the sample, proceed as follows:
- Rebuild the sample code using Visual Studio 2012 RC (or higher), whereby you require the TFS Object Model (OM).
- Run the TFSTeams.exe command line tool with the /? parameter to get parameter help.
- Run the TFSTeams.exe command line tool to list or create teams, and to add members to teams.
- [Optionally] extend the sample code to implement other administrative features.
Sample extract, TeamWrapper.cs:
|ALM Ranger Contributor(s)||Mattias Sköld|
|ALM Ranger Reviewers||Michael Fourie | Rui Melo | Willy-Peter Schaub|
|Product Group Reviewer(s) / SME||Ben Amodio | Gregg Boer | Hakan Eskici | Mario Rodriguez|
- Revise the sample code to include more administrative features
- Work with the ALM Rangers / ALM MVPs to build a command line tool for the community
- Add sample code to show the use of LiveIDs, for example when working with TFS Preview
Also please add your candid feedback and comments to this post!