Delen via


Labels Command

Displays the list of labels in the Team Foundation source control server.

tf labels [/owner:ownername] [/format:(brief|detailed)] 
[/server:servername] [labelname]

Parameters

Argument Description

ownername

Provides a username as DOMAIN\JuanGo or juango to the /owner option.

servername

The user-provided value for the /server option. Example: teamfoundation2.

labelname

Specifies a string that should be used to filter the list of labels. If this parameter is omitted, the label name field will not be filtered.

Option Description

/owner

Specifies the name of the user who owns the label.

/server

Identifies the Team Foundation Server. This option is required if the command is invoked from a directory that is not mapped to a workspace.

/format

Displays information about the specified label in one of the following formats:

  • Brief

    Includes label owner, and date and time created. This is the default.

  • Detailed

    Includes also comments and a list of files and folders associated with each label.

Remarks

The labels command displays information about labels in the Team Foundation source control server. If you do not specify a Team Foundation source control server, the Team Explorer tries to determine the Team Foundation source control server based by using the current directory. If the current directory is not mapped to a Team Foundation source control server, you must specify one by using the /s option.

By default, the results display the owner, creation date and creation time for each label. If the format is changed to "detailed," comments and the list of files and folders associated with each label are also displayed.

For links to other Team Foundation commands that provide additional information about the items in your Team Foundation source control server and all of the workspaces that map to it, see Informational Commands.

Examples

The following example displays the list of labels created by user “jasonj.”

c:\projects> tf labels /owner:jasonj

The following example displays information about “build1033” label and lists the files and folders to which the label has been applied in the Team Foundation source control server.

c:\projects> tf labels /format:detailed build1033

The following example displays all labels in the Team Foundation source control server that have a labelname that begins with “build” and are owned by the account executing the labels command.

c:\projects> tf labels build*

Security

To use the labels command, you must have the Read permission set to Allow for all files or folders to which the specified label is attached. If you have permission to some, but not all the files referenced in the label, partial results are displayed. For more information, see Team Foundation Server Permissions.

See Also

Reference

Command-Line Syntax
Label Command (Team Foundation Source Control)
Unlabel Command

Concepts

Informational Commands

Other Resources

Tf Command-Line Utility Commands