Connection Profiles

You can store connection information in profiles so that you do not have to specify it every time that you perform a version-control command. A connection profile contains information such as the URL of a version-control server for Team Foundation, proxy information, and authentication credentials. You can create a profile by providing only its name and the URL of the version-control server.

In this topic

Creating a Profile

You can create a profile by using the -new option with the profile command.

The following example creates a profile that is named john@tfs01 and stores the URL of the version-control server (, the user name (john), and the domain name (company). For this example, the name of the profile reflects the name of the user and of the server, but you can give your profiles any names that you want.

tf profile –new john@tfs01 \

-string:serverUrl= \

-string:userName=john –string:userDomain=company


Names of profile properties, such as serverUrl or userName, are case-sensitive. You must use the correct property names and types when you set properties.

The following example creates the same profile as in the previous example but includes a password that is quoted for shell compatibility.

tf profile -new john@tfs01 \

-string:serverUrl= \

-string:userName=john -string:userDomain=company -string:password="Se^%cret1”

Properties such as serverUrl, userName, and userDomain require string values. Properties such as httpProxyEnabled require Boolean or numeric values that you specify by using the –boolean or the –number options.

This following example shows how to set many properties in a profile that is called john@tfs01-proxied. The command is wrapped over many lines so that the options are easier to read.

tf profile -new john@tfs01-proxied \

-string:serverUrl= \

-string:userName=john \

-string:userDomain=company \

-string:password="Se^%cret1" \

-boolean:httpProxyEnabled=true \

-string:httpProxyUrl= \

-boolean:httpProxyEnableAuth=true \

-string:httpProxyUsername=john \

-string:httpProxyPassword="Pr8xyP&^ss" \

-boolean:tfProxyEnabled=true \

-string:tfProxyUrl= \



You can find the list of profile properties, their types, and brief descriptions by running the tf help profile command.

Accessing a Profile

You can access a profile by using the –profile option when you run a tf command. In the following example, the workspaces command uses the authentication information from the john@tfs01 profile:

tf workspaces –profile:john@tfs01


You can use the –login option to override the credentials that are stored in a connection profile. However, you must update each profile manually if information changes.

Editing a Profile

You can edit a profile by using the –edit option with the profile command and specifying the name of the profile that you want to edit. You can change only those properties that you specify with this option.

The following example disables the HTTP proxy in the profile that is named john@tfs01-proxied.

tf profile –edit john@tfs01-proxied -boolean:httpProxyEnabled=false

You can remove a property from a profile by using the –edit option and supplying an empty value for the property name.

The following example removes the tfProxyUrl property from the john@tfs01 profile.

tf profile –edit john@tfs01 –string:tfProxyUrl=

Deleting a Profile

You can delete a profile easily by using the –delete option with the profile command and specifying the name of the profile that you want to delete.

The following example deletes the profile that is named john@tfs01.

tf profile –delete john@tfs01

Listing Profiles

You can list all profiles that are configured for the users on your computer by using the profiles command. By default, only the profiles are listed, but you can list all profiles with their properties by using tf profiles –format:detailed.

See Also


Profile Command

Profiles Command


Command-Line Authentication for Team Explorer Everywhere