/gc Command

Use /gc to create a project-specific group.

Required Permissions

To use the /gc command, you must be a member of the Team Foundation Administrators security group. For more information, see Team Foundation Server Permissions.

Note

Even if you are logged on with administrative credentials, you must open an elevated Command Prompt to perform this function on a server that is running Windows Server 2008. To open an elevated Command Prompt, click Start, right-click Command Prompt, and click Run as Administrator. For more information, see the Microsoft Web site.

TFSSecurity /gc scope groupName [groupDescription] /server:servername

Parameters

Argument

Description

scope

Specifies the project GUID or URI of the team project. To view the URI, copy https://localhost:8080/services/v1.0/CommonStructureService.asmx to the browser, click ListAllProjects on Team Foundation Server, and then click Invoke.

groupName

Specifies the project group name.

groupDescription

Optional. Specifies the project group description.

/server:servername

Required. Specifies the name of the application-tier computer.

Remarks

Run this command on the local application-tier computer.

A group that has project scope is a security group for your team project. Project groups can be used to grant read, write, and administrative permissions to meet the security requirements of your organization.

Example

The following example creates a group specific to the project specified by the URI: "vstfs://Classification/TeamProject/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx." The group is named "Test Group" and it has the description "This group is for testing."

You must replace the placeholder GUID with the URI of the team project for which you want to create this group. To view the team project's URI, copy https://localhost:8080/services/v1.0/CommonStructureService.asmx to a browser on the application-tier for Team Foundation Server, and then click Invoke. The team project URI is displayed enclosed in the <Uri></Uri> tag.

After you run the command, you can verify the group in Team Explorer. Right-click the team project you used in the command, click Team Project Settings, and then click Group Memberships. Test Group is included in the Groups list in the Project Groups on <team project name> dialog box.

>TFSSecurity /gc "vstfs:///Classification/TeamProject/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" "Test Group" "This group is for testing" /server:MyServer

See Also

Tasks

How to: Create a Server-Level Group

How to: Create a Team Project Group

Other Resources

TFSSecurity Command-Line Utility Commands

Team Project Groups

Default Groups