Udostępnij za pośrednictwem


/gc Command

Use /gc at a command prompt to create a project-level group. To create a project-level group from the user interface, see Configuring Users, Groups, and Permissions.

Required Permissions

To use the /gc command, you must have the Edit Project-Level Information permission for that team project set to Allow. For more information, see Team Foundation Server Permissions.

TFSSecurity /gc Scope GroupName [GroupDescription] [/collection:CollectionURL]

Parameters

Argument

Description

Scope

The URI of the team project to which you want to add a project-level group. To obtain the URI for a team project, open Team Explorer, right-click the project, click Properties, and copy the entire value of the URL property.

GroupName

The name of the new group.

GroupDescription

A description of the project group. Optional.

/collection:CollectionURL

The URL of the team project collection. Required. The group will be created within the team project collection. The format for the URL is http://ServerName:Port/VirtualDirectoryName/CollectionName

Remarks

Run this command on an application-tier server for Team Foundation.

A project-level group is a security group for your team project. You can use project groups to grant read, write, and administrative permissions that meet the security requirements of your organization.

Example

The following example creates a group that is specific to the project that the URI "vstfs://Classification/TeamProject/00000000-0000-0000-0000-000000000000" specifies. The group is named "Test Group" and 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 obtain the URI for a team project, open Team Explorer, right-click the team project, click Properties, and copy the entire value of the URL property.

After you run the command, you can verify the group in Team Explorer. Right-click the team project that you used in the command, click Team Project Settings, and then click Group Memberships. In the Project Groups on TeamProjectName dialog box, the Groups list includes Test Group .

Note

You can use the /gc command to create groups but not to add any users to the groups or assign any permissions. To change the membership of the group, see /g+ Command and /g- Command. To change the permissions for the group, see /a+ Command and /a- Command.

>TFSSecurity /gc "vstfs:///Classification/TeamProject/00000000-0000-0000-0000-000000000000" "Test Group" "This group is for team members who test our code" /collection:CollectionURL

See Also

Tasks

Create a Collection-Level Group

Create a Team Project Group

Other Resources

Changing Groups and Permissions with TFSSecurity

Project-Level Groups

Default Groups