Profile Command
You can use the profile command to create, copy, update, and delete named login profiles. Login profiles are used to connect to instances of Visual Studio Team Foundation Server. Profiles that you create on a computer can only be accessed on that computer, and can be used by all clients of Team Explorer Everywhere.
You can specify a login profile when you run other commands. For more information, see Using a Profile.
Required Permissions
No Team Foundation Server permissions are required because profiles are all stored locally on the computer where you run the Cross-platform Command-Line Client for Team Foundation Server, in your home directory.
tf profile -copy ExistingProfileName NewProfileName
tf profile -delete ProfileName
tf profile -edit [-string:PropertyName=[StringValue]...] [-boolean:PropertyName=[true|false]...] [-number:PropertyName=[Number...]] ExistingProfileName
tf profile -new [-string:PropertyName=[StringValue]...] [-boolean:PropertyName=[true|false]...] [-number:PropertyName=Number]...] NewProfileName
Parameters
Argument |
Description |
---|---|
ExistingProfileName |
Specifies the name of a profile that exists on the local computer. |
NewProfileName |
Specifies a new profile name as part of a copy or new operation. |
PropertyName |
Specifies the name of a property that you want to define or update for the profile. For a list of common properties, their types, and descriptions, see Remarks. |
StringValue |
Specifies the value of a property whose data type is string. |
Number |
Specifies the value of a property whose data type is number. |
Option |
Description |
---|---|
-copy |
Specifies the source profile that you want to copy and the target profile name. |
-delete |
Specifies the profile that you want to delete from the local computer. |
-edit |
Specifies the profile on the local computer that you want to update, and also a list of updates. |
-new |
Specifies the profile and associated properties that you want to create on the local computer. |
-string |
Specifies that you want to add or update a string property for the specified profile. This option requires a property name and an optional property value. |
-boolean |
Specifies that you want to add or update a boolean property for the specified profile. This option requires a property name and an optional value. |
-number |
Specifies that you want to add or update a numeric property for the specified profile. This option requires a property name and an optional value. |
Remarks
All profiles contain a URL that specifies a Team Foundation Server project. If you connect to an instance of Visual Studio Team Foundation Server 2010, the URL also specifies a team project collection. The profile can contain other connection information such as user credentials and network proxy settings.
Note
Property names are case-sensitive.
The following table describes the most common profile properties:
Property |
Type |
Description |
---|---|---|
acceptUntrustedCertificates |
string |
If true, the Cross-platform Command-Line Client for Team Foundation Server will accept Secure Sockets Layer (SSL) certificates that cannot be verified (trusted) without error. If false or not specified, the command-line client will not accept untrusted SSL certificates. |
httpProxyEnableAuth |
boolean |
If true, the HTTP proxy credentials in this profile are used to authenticate to an HTTP proxy. If false or not specified, no authentication to the HTTP proxy occurs. |
httpProxyEnabled |
boolean |
If true, an HTTP proxy is used when you connect to an instance of Team Foundation Server. If false or not specified, no HTTP proxy is used. |
httpProxyIgnoreGlobal |
boolean |
If true, the proxy server URL that is configured in the profile is used. If false or not specified, the value of the HTTP_PROXY environment variable is used as the proxy server URL. If the httpProxyEnabled property is false or not specified, this property is ignored. |
httpProxyPassword |
string |
Specifies the password that is used to authenticate to the configured HTTP proxy. |
httpProxyUrl |
string |
Specifies the URL of the HTTP proxy server. |
httpProxyUsername |
string |
Specifies the username that is used to authenticate to the configured HTTP proxy. |
password |
string |
Specifies the password that is used to authenticate to the instance of Team Foundation Server. If this property is not defined, the Cross-platform Command-Line Client for Team Foundation Server can prompt for the password when it is required. |
serverUrl |
string |
Specifies the URL of the instance of Team Foundation Server or the team project collection. |
tfProxyEnabled |
boolean |
If true, the URL that is defined in this profile for the server that is running Team Foundation Server Proxy is used when files are downloaded from an instance of Team Foundation Server. If this value is false or not specified, Team Foundation Server Proxy is not used. |
tfProxyIgnoreGlobal |
boolean |
If true, the URL that is defined in this profile for the server that is running Team Foundation Server Proxy is used to accelerate file transfers. If false or not specified, the value of the TFSPROXY environment variable is used as the proxy server URL. If the tfProxyEnabled property is false or is not specified, this property is ignored. |
tfProxyUrl |
string |
Specifies the URL of the server that is running Team Foundation Server Proxy to use when files are downloaded from an instance of Team Foundation Server. |
useDefaultCredentials |
boolean |
If true, and default credentials are available, they will be used instead of the credentials that are stored in this profile to authenticate to the instance of Team Foundation Server. If false or not specified, the credentials in this profile will be used instead of any available default credentials. You can specify this option if you want to use Kerberos authentication. For more information, see Authentication by using Kerberos Ticket. |
userDomain |
string |
Specifies the Windows domain that is used to authenticate to the instance of Team Foundation Server. If this property is not specified, the Cross-platform Command-Line Client for Team Foundation Server can prompt for the domain when it is required. |
userName |
string |
Specifies the username that is used to authenticate to the instance of Team Foundation Server. If this property is not specified, the Cross-platform Command-Line Client for Team Foundation Server can prompt for it when it is required. |
Warning
All properties, which includes passwords, are stored as plaintext in the profile and the workspace cache files. These properties can be viewed by anyone who has read access to those files.
You can specify two proxies as part of your profile. The first, enabled when you specify httpProxyEnabled=true, defines the proxy used to connect to an instance of Team Foundation Server. The second, enabled when you specify tfProxyEnabled=true, specifies the proxy used to download files from Team Foundation version control.
You can use the profiles command to display information about the profiles on your local computer. For more information, see Profiles Command.
Examples
The following example copies a profile to the new profile named MyProfile.
tf profile -copy http://tfs01.xyz.example.com MyProfile
The following example updates the profile named MyProfile to turn off the httpProxy.
tf profile -edit MyProfile -boolean:httpProxyEnabled=false
The following example clears the tfProxyUrl property.
tf profile -edit MyProfile -string:tfProxyUrl=
The following example creates a complex profile that is named MyProxyProfile. The example is wrapped over several lines to make it easier to read.
tf profile -new MyProxyProfile \
-string:serverUrl=http://tfs01.xyz.example.com \
-string:userName=john \
-string:userDomain=company \
-string:password="Se^%cret1" \
-boolean:httpProxyEnabled=true \
-string:httpProxyUrl=http://proxy01.xyz.example.com \
-boolean:httpProxyEnableAuth=true \
-string:httpProxyUsername=john \
-string:httpProxyPassword="Pr8xyP&^ss" \
-boolean:tfProxyEnabled=true \
-string:tfProxyUrl=http://tfproxy01.xyz.example.com \
-boolean:acceptUntrustedCertificates=true
The following example deletes the profile named MyProfile.
tf profile -delete MyProfile
Using a Profile
To use a profile with the Cross-platform Command-Line Client for Team Foundation Server, specify the name of the profile with the /profile option when you run a command. For example, to use the john@tfs01 profile when you run the workspace command, specify the following command line:
tf -profile:john@tfs01 -workspaces