Table of contents

Manage TFS server configuration with TFSConfig

Last Updated: 7/7/2016

* TFS 2015 | TFS 2013 | TFS 2012 | TFS 2010 *

For versions earlier than TFS 2010, a few of these commands are available in the TFSAdminUtils command-line tool.

The TFSConfig command-line tool can be used to perform a variety of administrative actions for your on-premises deployment of Team Foundation Server (TFS).

TFSConfig can be run from any machine on which TFS has been installed. It is installed in the Tools directory - by default, this will be

  • TFS 2015: %programfiles%\Microsoft Team Foundation Server 14.0\Tools
  • TFS 2013: %programfiles%\Microsoft Team Foundation Server 12.0\Tools
  • TFS 2012: %programfiles%\Microsoft Team Foundation Server 11.0\Tools
  • TFS 2010: %programfiles%\Microsoft Team Foundation Server 2010\Tools

For many commands to operate correctly, TFSConfig will need to be able to connect to the various servers and services which are part of your TFS deployment, and the user running TFSConfig will need to have administrative permissions for these same servers and services. Requirements for specific commands will be called out below.

Many TFSConfig command must be run from an elevated Command Prompt, even if the running user has administrative credentials. To open an elevated Command Prompt, click Start, right-click Command Prompt, and then click Run as Administrator. For more information, see: User Account Control.

You can also perform administrative actions interactively using the administration console for TFS. See Configure and manage TFS resources.

Listing commands and getting help

To display a full list of TFSConfig commands, use the help command:

TFSConfig help

To get help for an individual command, use the help command and specify the name of the command with which you want help. For example, to get help for the accounts command:

TFSConfig help accounts

Accounts

Use the Accounts command to manage these TFS service accounts.

  • the TFS service account
  • the data sources account for SQL Server Reporting Services
  • the TFS Proxy service account

You can also use this command to change the ownership of the TFS databases.

TFSConfig Accounts /change|add|set|delete|updatepassword|resetowner
    [/AccountType:{AdminConsole|ApplicationTier|Proxy|ReportingDataSource}]
    [/Account:AccountName] [/Password:Password]
    [/SQLInstance:ServerName] [/DatabaseName:DatabaseName] [/Continue] [/usesqlalwayson]
OptionDescription
/change Changes the account that is used as the service account. This option adds the account that you specify to all the necessary groups, grants it the required permissions if possible, and sets the service to use the account. If you do not use the /AccountType option with this option, the service account for the application tier will be changed.
/add Adds an account to the groups that are required for using the account as a service account. This option adds the account that you specify to the necessary groups and grants it the permissions that are required to act as the service account (if possible). However, this option will not change the account that is used as the service account. This option is usually used in network load balancing (NLB) scenarios. You can use this option with /continue if some services or databases might not be available in your environment.
/set Sets an account as the service account. This option does not add the account to any groups. Therefore, you must use this option only with accounts that have already been added to the required groups and have the necessary permissions. This option is usually used in NLB scenarios.
/delete Removes an account from the account type that you specify. This option removes the account that you specify from the necessary groups and removes the permissions that are required to act as the service account (if possible). However, this option will not change the account that is used as the service account. Make sure that you do not use this option for an account that the servers in your deployment currently use as a service account.
/ResetOwner Changes the ownership of the databases that Team Foundation Server uses to the account that you are using to run this command. This option iterates though all the databases and sets the dbo login to the account that you are using to run this command. You might need to use this option when you move or restore a deployment.
/UpdatePassword Changes the password of an account that is used as a service account. This option updates the password for the account that you specify for all services in Team Foundation Server that use that account.
/AccountType: { AdminConsole | ApplicationTier | ReportingDataSource | Proxy }
  • AdminConsole: the group of users who have the minimum permissions that are required to open and use the administration console for Team Foundation (AdminConsole)
  • ApplicationTier: the service account that is used for Team Foundation Server (TFSService)
  • ReportingDataSource: the data sources account for Reporting Services (TFSReports)
  • Proxy: the service account for Team Foundation Server Proxy (TFSProxy)

The default value is ApplicationTier.

/Account: AccountName Specifies the name of the account that you want to add, change, or delete from a referenced account type, such as /AccountType:ApplicationTier. Specify Account in one of the following forms: Domain\AccountName or Computer\AccountName. If you want to use a system account, such as Network Service or Local System, use the Computer\AccountName format. For more information about how to specify a system account, see the usage examples later in this topic.
/Password: Password Specifies the password of the service account.

Note: This parameter is optional if you are using a system account or an account that does not have a password, such as Network Service.
/SQLInstance: ServerName Used only with /ResetOwner. Specifies the name of the server that is running SQL Server and the name of the instance if you want to use an instance other than the default instance. You must specify the name and instance in the following format:

ServerName\InstanceName.
/DatabaseName: DatabaseName Used only with /ResetOwner. Specifies the name of the database whose ownership you want to change. By using this command, you reset the ownership of the database that you specify to the account under which you are running the command.
/continueUpdates any groups that are not available when you run the command. This option is usually used in NLB scenarios.
/usesqlalwayson Used only with /ResetOwner in conjunction with /SQLInstance and /DatabaseName. Specifies that the databases are part of an AlwaysOn Availability Group in SQL Server. If configured, this option sets MultiSubnetFailover in the connection string.

For more information, see AlwaysOn Availability Groups (SQL Server).

Required permissions

To use the Accounts command, you must be a member of

  • the Team Foundation Administrators security group
  • the sysadmin role for all SQL Server instances that your TFS instance uses.

If you use the /proxy option, you must be an administrator on the proxy server.

For more information, see Permission reference for Team Foundation Server>.

Remarks

Use the Accounts command to automate changes to the service accounts, databases, and service account groups of Team Foundation Server. You can configure accounts that you have already created, but you can't create accounts.

Before you change the domain or workgroup of an account, the account must have the Account is sensitive and cannot be delegated permission on the application-tier server. For more information, see this page on the Microsoft Web site: Enabling Delegated Authentication.

The Accounts command supports on-premises TFS deployments. To change the account owner of a Team Services account, see Change account ownership.

Examples

Change the service account of data sources for Reporting Services to a new account in the Contoso domain, Contoso\NewAccount, and the password, to Password.

TFSConfig Accounts /change /AccountType:ReportingDataSource /Account:Contoso\NewAccount /Password:Password

Add the Network Service system account to the service account groups for Team Foundation Server. (System accounts don't have passwords.)

TFSConfig Accounts /add /AccountType:ApplicationTier /Account:"NT Authority\Network Service"

Change the ownership of the "TFS_Warehouse" database on the "ContosoMain" SQL Server in the "TeamDatabases" named instance to the user account under which you are running the command.

Note:
You can't specify what account to set as the owner of the databases when you use this command. The owner will be set to the account under which you are running the command.

TFSConfig Accounts /ResetOwner /SQLInstance:ContosoMain\TeamDatabases /DatabaseName:TFS_Warehouse

Authentication

The Authentication command changes the network authentication protocol that the TFS application tier or proxy website uses.

TFSConfig Authentication [/provider:NTLM|Negotiate] [/viewAll] [/siteType:ApplicationTier|Proxy]
OptionDescription
/viewAllDisplays the current authentication settings for TFS.
/provider: { NTLM | Negotiate }Specifies the authentication provider you want to configure for the website.
  • NTLM: Use the NTML authentication protocol
  • Negotiate: Use the Negotiate (Kerberos) authentication protocol
/siteTypeSpecifies the website (applicaiton tier or prox) whose network authentication protocol you want to change. The application tier is the default.

Required permissions

To use the Authentication command, you must be a member of the Team Foundation Administrators security group and a local administrator on the application-tier server or proxy server, depending on the value of the siteType option.

Remarks

The Authentication command is used by an administrator who wants to change the network authentication protocol for one or more websites on which TFS relies. The administrator runs this command from the application tier to update those websites that require a change in their network authentication protocol. The command changes the NTAuthenticationProviders property in the IIS metabase.

Before you use the Authentication command to change the authentication protocol, you can run the command with the /viewAll option to see what the existing settings are.

Example

The following example displays the current value that is assigned for the network authentication protocol.

TFSConfig Authentication /viewAll

Certificates

Use the Certificates command to change how certificates are configured for client authentication in a deployment of TFS that utilizes HTTPS, secure sockets layer (SSL), and certificates.

TFSConfig Certificates [/machine] [/disable] [/autoSelect] [/noprompt] [/thumbprints:thumbprint1[,thumbprint2,...]]
OptionDescription
/machineSpecifies that the certificate list will be from the local machine context instead of the current user context.
/disableSpecifies that the client authentication certificate setting will be disabled.
/autoSelectSpecifies that a certificate will be automatically selected from the certificate list. The Manage Client Certificates window will not open.
/nopromptSpecifies that the Manage Client Certificates window will not open when the Certificates command is run.
/thumbprints: thumbprintSpecifies that the certificate that matches the specified thumbprint will be used. You can specify more than one certificate by separating individual thumbprints with a comma.

Required permissions

To use the Certificates command, you must be a member of the Team Foundation Administrators security group and the local Administrators group on the computer from which you run the command. For more information, see Permission reference for Team Foundation Server.

Remarks

By default, the Certificates command will automatically select a client certificate from the certificate list for the current user. However, you can use the options for the command to specify a specific certificate or certificates from the current user context or from the local machine context.

Before you use the Certificates command, you must first configure the servers in your deployment of TFS to utilize certificates. For more information, see Setting up HTTPS with Secure Sockets Layer (SSL) for Team Foundation Server.

You use the Certificates command to configure the client certificates that are used by a deployment of TFS that has been configured to use HTTPS/SSL and certificates. If you use the Certificates command with no options, a client certificate will be automatically selected from the current user context from which you run the command.

Examples

The following example shows how to specify the local machine certificate that has the thumbprint "aa bb cc dd ee" with no prompting.

TFSConfig Certificates /machine /thumbprint:aa bb cc dd ee /noprompt

The following example shows how to specify using automatic selection of a client certificate from the current user store.

TFSConfig Certificates /autoselect

ChangeServerID

The ChangeServerID command changes the GUIDs that are associated with the databases for TFS. GUIDs must be unique within a deployment of TFS. If more than one database has the same GUID, your deployment can become unstable or unusable. You can change the GUID for the configuration database, the GUIDs for all team project collection databases in the deployment, or both. Although you would not typically use this command in daily operations, you might use this command in the following circumstances:

  • You restored your deployment to new hardware, the old deployment is still operational, and you want to utilize both deployments. This scenario is sometimes referred to as cloning the server.

  • You want to test a software update or a hardware configuration on a duplicate deployment so that you do not risk disrupting your production environment.

  • You want to fully test the restoration of databases to new hardware in a test lab or separate environment, to ensure that your deployment can be restored.

  • You must reset the GUID for a collection database after moving it to another deployment for which that GUID is already reserved.

    Note: The ChangeServerID command is not reversible. After a GUID has been changed, you cannot undo that change except by restoring a previous version of that database.

    TFSConfig ChangeServerID /SQLInstance:ServerName /DatabaseName:ConfigurationDatabaseName

    [/ProjectCollectionsOnly] [/ConfigDBOnly] [/usesqlalwayson]
    
OptionDescription
/SQLInstance: ServerNameRequired. Specifies the name of the server that is running SQL Server and the name of the instance if you want to use an instance other than the default instance. If you specify an instance, you must use the format: ServerName\InstanceName
/DatabaseName: DatabaseNameRequired. Specifies the name of the configuration database for TFS. By default, the name of this database is TFS_ConfigurationDB.
/ProjectCollectionsOnlySpecifies that only the GUIDs for collections will be changed.
/ConfigDBOnlySpecifies that only the GUID for the configuration database will be changed.
/usesqlalwaysonSpecifies that the databases are part of an AlwaysOn Availability Group in SQL Server. If configured, this option sets MultiSubnetFailover in the connection string.

For more information, see AlwaysOn Availability Groups (SQL Server).

Required permissions

To use the ChangeServerID command, you must be a member of the Team Foundation Administrators security group and a member of the sysadmin security role for all SQL Server instances that Team Foundation Server uses. For more information, see Permission reference for Team Foundation.

Remarks

You use the ChangeServerID command to create a discrete duplicate of a deployment of Team Foundation Server for testing or cloning purposes. After you use the ChangeServerID command, you must direct clients to create a connection to the changed server before it can be used.

Example

The following example shows how to change the GUIDs of all databases in the Contoso1 deployment of TFS, where the configuration database is hosted on the server that is named "ContosoMain" on the named instance "TeamDatabases" in SQL Server.

TFSConfig ChangeServerID /SQLInstance:ContosoMain\TeamDatabases /DatabaseName:TFS_ConfigurationDB

CodeIndex

Command availability: TFS 2015 and TFS 2013

Use the CodeIndex command to manage code indexing on Team Foundation Server. For example, you might want to reset the index to fix CodeLens information, or turn off indexing to investigate server performance issues.

TFSConfig CodeIndex /indexingStatus | /setIndexing:[ on | off | keepupOnly ] |
    /ignoreList:[ add | remove | removeAll | view ] ServerPath |
    /listLargeFiles [/fileCount:FileCount] [/minSize:MinSize] |
    /reindexAll | /destroyCodeIndex [/noPrompt] |
    /temporaryDataSizeLimit:[ view | <SizeInGBs> | disable ] |
    /indexHistoryPeriod:[ view | all | <NumberOfMonths> ] [/collectionName:CollectionName | /collectionId:CollectionId]
Option Description

/indexingStatus

Show the status and configuration of the code indexing service.

/setIndexing:[ on | off | keepupOnly ]

  • on: Start indexing all changesets.

  • off: Stop indexing all changesets.

  • keepupOnly: Stop indexing previously created changesets and start indexing new changesets only.

/ignoreList:[ add | remove | removeAll | view ] ServerPath

Specifies a list of code files and their paths that you don't want indexed.

  • add: Add the file that you don't want indexed to the ignored file list.

  • remove: Remove the file that you want indexed from the ignored file list.

  • removeAll: Clear the ignored file list and start indexing all files.

  • view: See all the files that aren't being indexed.

  • ServerPath: Specifies the path to a code file.

    You can use the wildcard character (*) at the start, end, or both ends of the server path.

/listLargeFiles [/fileCount:FileCount/minSize:MinSize]

Shows the specified number of files that exceeds the specified size in KB. You can then use the /ignoreList option to exclude these files from indexing.

For this, you'll need Team Foundation Server 2013 with Update 3.

/reindexAll

Clear previously indexed data and restart indexing.

/destroyCodeIndex [/noPrompt]

Delete the code index and remove all indexed data. Does not require confirmation if you use the /noPrompt option.

/temporaryDataSizeLimit:[ view | <SizeInGBs> | disable ]

Control how much temporary data that CodeLens creates when processing changesets. The default limit is 6 GB (2 GB in Update 5).

  • view: Show the current size limit.

  • SizeInGBs: Change the size limit.

  • disable: Remove the size limit.

This limit is checked before CodeLens processes a new changeset. If temporary data exceeds this limit, CodeLens will pause processing past changesets, not new ones. CodeLens will restart processing after the data is cleaned up and falls below this limit. Cleanup runs automatically once a day. This means temporary data might exceed this limit until cleanup starts running.

For this, you'll need Team Foundation Server 2013 with Update 4.

/indexHistoryPeriod:[ view | all | <NumberOfMonths> ]

Control how long to index your change history. This affects how much history CodeLens shows you. The default limit is 12 months. This means CodeLens shows your change history from the last 12 months only.

  • view: Show the current number of months.

  • all: Index all change history.

  • NumberOfMonths: Change the number of months used to index change history.

For this, you'll need Team Foundation Server 2013 with Update 4.

/collectionName:CollectionName

Specifies the name of the team project collection on which to run the CodeIndex command. Required if you don't use /CollectionId.

/collectionId:CollectionId

Specifies the identification number of the team project collection on which to run the CodeIndex command. Required if you don't use /CollectionName.

Required permissions

To use the CodeIndex command, you must be a member of the Team Foundation Administrators security group. See Permission reference for Team Foundation Server.

Examples

To see the code indexing status and configuration:

TFSConfig CodeIndex /indexingStatus /collectionName:"Fabrikam Web Site"

To start indexing all changesets:

TFSConfig CodeIndex /setIndexing:on /collectionName:"Fabrikam Web Site"

To stop indexing previously created changesets and start indexing new changesets only:

TFSConfig CodeIndex /setIndexing:keepupOnly /collectionName:"Fabrikam Web Site"

To find up to 50 files that are larger than 10 KB:

TFSConfig CodeIndex /listLargeFiles /fileCount:50 /minSize:10 /collectionName:"Fabrikam Web Site"

To exclude a specific file from indexing and add it to the ignored file list:

TFSConfig CodeIndex /ignoreList:add "$/Fabrikam Web Site/Catalog.cs" /collectionName:"Fabrikam Web Site"

To see all the files that aren't indexed:

TFSConfig CodeIndex /ignoreList:view

To clear previously indexed data and restart indexing:

TFSConfig CodeIndex /reindexAll /collectionName:"Fabrikam Web Site"

To save all changeset history:

TFSConfig CodeIndex /indexHistoryPeriod:all /collectionName:"Fabrikam Web Site"

To remove the size limit on CodeLens temporary data and continue indexing regardless of temporary data size:

TFSConfig CodeIndex /temporaryDataSizeLimit:disable /collectionName:"Fabrikam Web Site"

To delete the code index with confirmation:

TFSConfig CodeIndex /destroyCodeIndex /collectionName:"Fabrikam Web Site"

Collection

You can use the Collection command to attach, detach, or delete a team project collection from a deployment of TFS. You can also use the Collection command to duplicate the database of an existing collection, rename it, and attach it to the deployment. This process is sometimes referred to as cloning a collection. However, you cannot use the Collection command to create a team project collection.

TFSConfig Collection {/attach | /detach | /delete} [/collectionName:CollectionName]
    [/collectionDB:ServerName;DatabaseName] [/clone]

Parameters

OptionDescription
/attach Required if neither /detach nor /delete is used. If you specify this option, you must also use the /collectionDB option. As an option, you can also use /collectionName and /clone with this option. If you use the /attach option, the specified collection database will be added to your deployment of TFS.
/detach Required if neither /attach nor /delete is used. If you specify this option, you must also use the /collectionName option. If you use the /detach option, the database for the specified collection will be stopped, and the collection will be detached from your deployment of TFS.
/delete Required if neither /detach nor /attach is used. If you specify this option, you must also use the /collectionName option. If you use the /delete option, the database for the specified collection will be stopped, and the collection will be permanently detached from TFS. You will not be able to re-attach the collection database to this or any other deployment.

Tip: The /delete option will not delete the collection database from SQL Server. After deleting the collection database from TFS, you can delete the database manually from SQL Server.
/CollectionName: CollectionName Specifies the name of the team project collection. If the name of the collection contains spaces, you must enclose the name in quotation marks (for example, "My Collection"). Required if either /detach or /delete is used. If you use this option with /detach or /delete, it specifies the collection that will be detached or deleted. If you use this option with /attach, it specifies a new name for the collection. If you use this option with both /attach and /clone, it specifies the name for the duplicated collection.
/CollectionDB: ServerName;DatabaseName Required if /attach is used. This option specifies the name of the server that is running SQL Server and the name of the collection database that is hosted on that server.
  • ServerName: Specifies the name of the server that hosts the configuration database for TFS, and the name of the instance if you want to use an instance other than the default instance. If you specify an instance, you must use the format: ServerName\InstanceName.
  • DatabaseName: Specifies the name of the configuration database. By default, the name of this database is TFS_ConfigurationDB.
/clone If you specify this option, the original collection database will be attached as a clone in SQL Server, and this database will be attached to TFS. This option is primarily used as part of splitting a team project collection.

Required permissions

To use the Collections command, you must be a member of the Team Foundation Administrators security group as well as the local Administrators group on the machine running TFSConfig. You must also be a member of the sysadmin security role for all instances of SQL Server used by TFS databases. If your deployment is integrated with SharePoint and you are using the /delete option, you must also be a member of the Farm Administrators group for the SharePoint farm from which you are deleting the site collection.

For more information, see Permission reference for Team Foundation Server.

Remarks

To manage collections interactively or to create a collection, you can use the Team Project Collections node in the administration console for Team Foundation. See Manage team project collections.

Examples

The following example shows how to permanently remove the "Contoso Summer Intern Projects" team project collection from a deployment of Team Foundation Server.

TFSConfig Collection /delete /CollectionName:"Contoso Summer Intern Projects"

TFSConfig - Team Foundation Server Configuration Tool
Copyright � Microsoft Corporation. All rights reserved.
Deleting a team project collection is an irreversible operation. A deleted collection cannot be reattached to the same or another Team Foundation Server. Are you sure you want to delete 'Contoso Summer Intern Projects'? (Yes/No)
Yes
Found Collection 'Contoso Summer Intern Projects' Deleting...
The delete of collection 'Contoso Summer Intern Projects' succeeded.

The following example shows how to duplicate the "Contoso Summer Interns Projects" team project collection, name it "Contoso Winter Interns Projects," and attach the duplicate collection to the deployment of Team Foundation Server.

TFSConfig Collection /attach /collectiondb:"ContosoMain;TFS_Contoso Summer Interns Projects"
    /CollectionName:"Contoso Winter Intern Projects" /clone

ColumnStoreIndex

Command availability: TFS 2015 Update 2

You use the ColumnStoreIndex command to enable or disable column store indexes for the databases used by your TFS deployment.

TfsConfig columnStoreIndex /enabled:{true|false}
    /sqlInstance:ServerName
    /databaseName:DatabaseName
OptionDescription
/enabledSpecifies whether you are enabling or disabling column store index for the given SQL instance and database.
/sqlInstance Specifies the name of the server that hosts the database for which column store index is being enabled or disabled, and the name of the instance if an instance other than the default is used. If you specify an instance, you must use the format: ServerName\InstanceName
/databaseNameSpecifies the name of the database for which column store index is being enabled or disabled.

Required permissions

To use the ColumnStoreIndex command, you must be a member of the sysadmin role for the specified SQL Server instance.

Remarks

You would typically use the ColumnStoreIndex command if you were moving a database from a SQL instance which supported column store index to one which did not. In this case, you would need to disable all column store indexes before you could successfully move the databases. Similarly, if you were moving a database back to a SQL instance which supported column store index you might wish to re-enable column store index in order to save space and gain performance.

Example

The following example shows how to enable column store index, for a database named TFS_DefaultCollection on a SQL instance running on a server named "ContosoMain" on the named instance "TeamDatabases".

TFSConfig columnStoreIndex /enabled:true /sqlInstance:ContosoMain\TeamDatabases /databaseName:TFS_DefaultCollection

ConfigureMail

Configure the server that runs Team Foundation Server (TFS) to use an existing SMTP server for email alerts.

TFSConfig ConfigureMail /FromEmailAddress:emailAddress /SmtpHost:SMTPHostName
OptionDescription
/FromEmailAddress: emailAddressSpecifies the address from which to send email notifications from TFS for a check in, work item assigned to you, or other notifications. This address is also checked for validity and, depending on your server configuration, might have to represent a valid email account on the mail server.If the address does not exist or is not valid, the default email address is used.
/SmtpHost: SMTPHostNameSpecifies the name of the server that hosts the mail server.

Required permissions

To use the ConfigureMail command, you must be a member of the Team Foundation Administrators security group on the Team Foundation application-tier server. For more information, see Permission reference for Team Foundation Server

Remarks

You can also use the administration console to configure TFS to use an SMPT server.

Example

The following example shows the syntax used to configure the from email address to TFS@contoso.com and the SMTP mail server as ContosoMailServer:

TFSConfig ConfigureMail /FromEmailAddress:TFS@contoso.com /SmtpHost:ContosoMailServer

DBCompression

Command availability: TFS 2015 and TFS 2013 For earlier versions of TFS, see https://support.microsoft.com/kb/2712111

You use the DBCompression command to enable or disable database page compression for the databases used by your TFS deployment.

TFSConfig dbCompression /pageCompression:{enable|disable}
    /sqlInstance:ServerName
    /databaseName:DatabaseName
    [/rebuildNow [/offline]]
OptionDescription
/pageCompressionSpecifies whether you are enabling or disabling page compression for the given SQL instance and database.
/sqlInstance Specifies the name of the server that hosts the database for which page compression is being enabled or disabled, and the name of the instance if an instance other than the default is used. If you specify an instance, you must use the format: ServerName\InstanceName
/databaseNameSpecifies the name of the database for which page compression is being enabled or disabled.
/rebuildNowOptional. Specifies whether database indexes should be rebuilt (and compressed or decompressed as necessary) immediately. If not used, indexes will be rebuilt by a background job which runs weekly.
/offlineOptional. Used only in combination with /rebuildNow. If /offline is not specified, indexes will be rebuilt online. If /offline is specified, indexes will be rebuilt offline. This will block other operations, but may be faster than an online index rebuild.

Required permissions

To use the DBCompression command, you must be a member of the sysadmin role for the specified SQL Server instance.

Remarks

You would typically use the DBCompression command if you were moving a database from a SQL instance which supported compression to one which did not. In this case, you would need to disable compression and decompress all indexes before you could successfully move the databases. Similarly, if you were moving a database back to a SQL instance which supported compression you might wish to re-enable compression in order to save space.

This command only changes whether TFS prefers to use database page compression or not - your databases must still be hosted in a SQL instance whose edition supports compression. See Features Supported by the Editions of SQL Server for more information.

Example

The following example shows how to enable page compression immediately, with indexes rebuilt online, for a database named TFS_DefaultCollection on a SQL instance running on a server named "ContosoMain" on the named instance "TeamDatabases".

TFSConfig dbCompression /pageCompression:enable /sqlInstance:ContosoMain\TeamDatabases /databaseName:TFS_DefaultCollection /rebuildNow

Identities

The Identities command lists or changes the security identifier (SID) of users and groups in your deployment of TFS. You might need to change or update the SID for users and groups in one of the following scenarios:

  • changing the domain of your deployment

  • changing from a workgroup to a domain or from a domain to a workgroup

  • migrating accounts across domains in Active Directory

    Note:
    You do not need to run this command if you are changing domains within the same Active Directory forest. TFS will automatically handle SID changes for moves within the same forest.

    TFSConfig Identities [/change /fromdomain:DomainName1 /todomain:DomainName2 [/account:AccountName]

    [/toaccount:AccountName]] [/sqlInstance:ServerName /databaseName:DatabaseName] [/account:AccountName] [/usesqlalwayson]
    
OptionDescription
/changeSpecifies that you want to change identities instead of listing them.
/fromdomain: DomainNameRequired when using /change. Specifies the original domain of the identities that you want to change. If you are changing from a workgroup environment, specifies the name of the computer.
/todomain: DomainNameRequired when using /change. Specifies the domain to which you want to change identities. If you are changing to a workgroup environment, specifies the name of the computer.
/account: AccountNameSpecifies the name of an account for which you want to list or change identities.
/toaccount: AccountNameSpecifies the name of an account to which you want to change identities.
/SQLInstance: ServerNameSpecifies the name of the server that is running SQL Server and the name of the instance if you want to use an instance other than the default instance. If you specify an instance, you must use the following format:

ServerName\InstanceName
/DatabaseName: DatabaseNameSpecifies the name of the configuration database for TFS.
/usesqlalwaysonSpecifies that the databases are part of an AlwaysOn Availability Group in SQL Server. If configured, this option sets MultiSubnetFailover in the connection string.

For more information, see AlwaysOn Availability Groups (SQL Server).

Required permissions

To use the Identities command, you must be a member of the Team Foundation Administrators security group and a member of the sysadmin role for all SQL Server instances that Team Foundation Server uses. For more information, see Set administrator permissions for Team Foundation Server.

Remarks

You can optionally specify the database to change identities before you configure an application-tier server for the deployment. For example, you might specify the database to change the service account when you clone a deployment of TFS.

When you change identities, the target account or accounts must already exist in Windows.

You must wait for the next identity synchronization with Windows before the properties of accounts that you change with this command will be updated. This requirement includes changes from group to user, user to group, and domain account to local account.

Examples

The following example shows how to list the names of all Windows users and groups that are stored in TFS and to display whether the SID for each user or group matches the SID in Windows. The Contoso1 domain administrators created domain groups such as "Contoso1\Developers" and "Contoso1\Testers" to help ease the management of permissions across TFS, SQL Server Reporting Services, and SharePoint Products.

TFSConfig Identities

Sample output:

TFSConfig - Team Foundation Server Configuration Tool
Copyright � Microsoft Corporation. All rights reserved.

Account Name Exists (see note 1) Matches (see note 2)
--------------------------------------------------------------------
CREATOR OWNER True True
Contoso1\hholt True True
BUILTIN\Administrators True True
Contoso1\Developers True True
Contoso1\Testers True True
Contoso1\PMs True True
Contoso1\jpeoples True True
Contoso1\Domain Admins True True
Contoso1\SVCACCT1 True True

9 security identifiers (SIDs) were found stored in Team Foundation Server. Of these, 9 were found in Windows. 0 had differing SIDs.

The following example shows how to change the SIDs for all accounts in Team Foundation Server from the Contoso1 domain to the SIDs for accounts that have matching names in the ContosoPrime domain. Only account names that match will have their SIDs updated. For example, if the "hholt" account exists as Contoso1\hholt and ContosoPrime\hholt, the account SID will be changed to the SID for ContosoPrime\hholt. If the "ContosoPrime\hholt" account does not exist, the SID will not be updated for Contoso1\hholt.

TFSConfig Identities /change /fromdomain:Contoso1 /todomain:ContosoPrime

The following example shows how to change the account for a single user account, Contoso1\hholt, to the account for another user account, ContosoPrime\jpeoples.

TFSConfig Identities /change /fromdomain:Contoso1 /todomain:ContosoPrime /account:hholt /toaccount:jpeoples

The following example shows how to change the SID of the "NT AUTHORITY\NETWORK SERVICE" service account that is used in the deployment of Team Foundation Server when changing the domain of the deployment from Contoso1 to ContosoPrime. To change a system account such as Network Service, you must follow a two-stage process. You first change the service account from NT AUTHORITY\NETWORK SERVICE to a domain account in the new domain (TempSVC), and then you change the account back to NETWORK SERVICE on the server in the new domain. The configuration database is hosted on the server that is named "ContosoMain" on the named instance "TeamDatabases" in SQL Server.

TFSConfig Identities /change /fromdomain:"NT AUTHORITY" /todomain:ContosoPrime /account:"NETWORK SERVICE"
    /toaccount:TempSVC /SQLInstance:ContosoMain\TeamDatabases /DatabaseName:TFS_ConfigurationDB

TFSConfig Identities /change /fromdomain:ContosoPrime /todomain:"NT AUTHORITY" /account:TempSVC
    /toaccount:"NETWORK SERVICE"

Jobs

You can use the Jobs command to create a log file that provides the details of the most recent job activity for a specific team project collection, or to retry a job for one or all team project collections.

TFSConfig Jobs /retry|dumplog [/CollectionName:CollectionName] [/CollectionID:ID]
OptionDescription
/retryRequired if /dumplog is not used. Specifies that the most recent job will be reattempted for the specified team project collection. If you use this option, you must also use either the /CollectionName or the /CollectionID option.
/dumplogRequired if /retry is not used. Specifies that the most recent job activity for the collection will be sent to a log file. If you use this option, you must also use either the /CollectionName or /CollectionID option.
/CollectionName: CollectionNameRequired if /CollectionID is not used. Specifies the name of the collection for which the most recent job will be either retried (/retry) or logged (/dumplog). If you want to specify all collections, you can use an asterisk (*).
/CollectionID: IDRequired if /CollectionName is not used. Specifies the identification number of the collection for which the most recent job will be either retried (/retry) or logged (/dumplog).

Required permissions

To use the Jobs command, you must be a member of the Team Foundation Administrators security group. For more information, see Permission reference for Team Foundation Server.

Remarks

To retry a job interactively, you can open the administration console for Team Foundation, click the Status tab for the collection, and then click Retry Job. For more information, see Open the Team Foundation Administration Console.

Example

The following example shows how to create a log file that lists the most recent job activity for the "Contoso Summer Intern Projects" team project collection in Team Foundation Server.

TFSConfig Jobs /dumplog /CollectionName:"Contoso Summer Intern Projects"

Lab /delete

Use the TfsConfig Lab /Delete option to remove all group hosts, library shares, and environments from a specified team project collection. By default, the associated objects in the System Center Virtual Machine Manager (SCVMM) are not deleted. You can add the /External option to the command line to remove the objects from the project collection and from SCVMM.

TfsConfig Lab /Delete /CollectionName:collectionName [/External] [/NoPrompt]
OptionDescription
CollectionName:collectionNameRequired. Specifies the name of the team project collection on the application tier of Team Foundation Server.
ExternalOptional. When specified, removes the library shares and host groups in SCVMM in addition to the objects in the team project collection. When /External is not specified, the TfsConfig Lab /Delete command only removes the objects in the team project collection.
NoPromptOptional. When specified, does not display progress and success information.

Remarks

Use the /Delete command to remove the lab assets from a project collection when you want to detach the lab configuration of a project collection. This is useful when moving a project collection from one Team Foundation Server (TFS) instance to another, and where the new Team Foundation Server instance uses a different SCVMM server than the original one. In this case, you will have to delete all the lab assets and reconfigure lab for the project collection.

Note:
The /Delete option works on all lab assets in a team project collection only when the /LibraryShare and /GroupHost options are not specified on the command line. For more information, see TFSConfig Lab /LibraryShare Commands and TFSConfig Lab /HostGroup Commands.

Example

In the following example, all lab objects in the DefaultCollection team project collection are removed. Because the /External option is not specified, the objects are retained in SCVMM.

tfsconfig lab /delete /collectionName:DefaultCollection 

Lab /dns

The TfsConfig Lab /DNS command adds, deletes, or displays DNS records that were created by Visual Studio Lab Management for network-isolated environments.

TfsConfig Lab /DNS 
{/Add | /Delete | /List}
    [/CollectionName:collectionName |
    / CollectionName:collectionName /TeamProject:projectName |
    / CollectionName:collectionName /TeamProject:projectName /LabEnvironment:environmentUri |
    /Name:FQDN /IP:IpAddress]
    [/NoPrompt]
OptionDescription
AddAdds the specified DNS records. To use the /Add option, the targeted environments must be running.
DeleteRemoves the specified DNS records.
ListDisplays the specified DNS records.
LabEnvironment: environmentUriTargets the /Add, /Delete, or /List options to an individual network-isolated environment that is specified by environmentUri.

To use the LabEnvironment option, you must also specify the /Collection and /TeamProject options.
TeamProject: projectNameWhen used without /LabEnvironment, targets the /Add, /Delete, or /List options to all of the network-isolated environments in the team project that is specified by projectName. Otherwise, /TeamProject specifies the team project that contains the environment.

To use the /TeamProject option, you must also specify the /Collection option
CollectionName: collectionNameWhen used without /TeamProject, targets the /Add, /Delete, or /List options to all of the network-isolated environments in the team project collection that is specified by collectionName. Otherwise, /Collection specifies the team project collection that contains the team project.
Name: FQDNSpecifies the fully qualified domain name of the network location that contains the environment to target.

You must specify the /Name and /IP options together.
IP: IPAddressSpecifies the IP address of the environment to target.

You must specify the /Name and /IP options together.

Remarks

Team Foundation Server uses the suffix you enter when it registers a unique external name with DNS for each virtual machine in a network-isolated environment. The DNS alias record makes it possible for machines and other objects outside the isolated network to communicate with machines inside the isolated network. Because Team Foundation Server goes into the DNS zone to register the alias record, the service account under which Team Foundation runs must have permissions to add or delete alias records in the specified DNS zone.

If your Team Foundation Server deployment has more than one application tier and each application tier runs under a different service account, then each application-tier service account must have permission to edit the DNS alias records created by the other application tiers.

Note:
DNS record management is performed automatically by Lab Management. You should use the /DNS command only in the following situations:

  • You change the account under which Visual Studio Team Foundation Server (TFS) runs.
  • You move a team project collection from one instance of Team Foundation Server to another.

In both these cases, the DNS records that were created by using the old TFS service account have to be removed, and then the same DNS records have to be re-created by using the new TFS service account. If these steps are not performed in the previous scenarios, the new TFS service account will not be able to perform automatic management of those DNS records. As a result, users will not be able connect to virtual environments.

Specify only one of the /Add, /Delete, or /List options on a TfsConfig Lab /DNS command line. If you do not specify any target options, the operation acts on all virtual machines of all network isolated environments that belong to all project collections in the Team Foundation Server database.

To target the DNS entries of network isolated environments of an object in the Lab Management object hierarchy, use the appropriate combination of /Collection, /TeamProject, and /LabEnvironment options

  • The /LabEnvironment option targets the command to the specified network-isolated environment. You must use the /CollectionName and /TeamProject options with the /LabEnvironment option to specify the team project collection and the team project that contain the environment.

    Use the format vstfs:///LabManagement/LabEnvironment/ environmentID to specify the environment URI. You can view the environment identifier (environmnetID) in the Environment Viewer of Lab Management or from the description of the virtual machine in SCVMM Administrator Console.

  • The /TeamProject option targets the operation to isolated network environments in the specified team project. The /TeamProject option must be used with the /CollectionName option and the /CollectionName option must specify the team project collection that contains the team project.

  • The /CollectionName option targets the operation to network isolated environments in the specified team project collection.

The second way to target a network isolated environment is to use the /Name and /IP options to specify the fully qualified external name and external IP address of an individual virtual machine. You must specify both the /Name and /IP options on the command line. You can view the external name and external IP address of a virtual machine in the Environment Viewer of Lab Management or from the description of the virtual machine in SCVMM Administrator Console.

Examples

In the first example, records for all network-isolated environments in a team project are added to DNS. In the second example, an individual DNS record is removed.

REM First example
tfsconfig lab /dns /add /collectionname:Collection0 /teamproject:Project1

REM Second example
tfsconfig lab /dns /delete /name:0b668996-2736-46d2-88ac-0733acbd0d9c.contoso.com /ip:111.00.000.000

Lab /hostgroup

Use the TfsConfig Lab /HostGroup commands to add, edit, or delete the assignment of a System Center Virtual Machine Manager (SCVMM) host group to a team project collection. Host groups that are assigned in this manner are managed by Visual Studio Lab Management.

TfsConfig Lab /hostgroup /CollectionName:collectionName
  { /Add 
        /SCVMMHostGroup:vmmHostPath 
        /Name:name 
        [LabEnvironmentPlacementPolicy:{Conservative|Aggressive}]
        [/AutoProvision:{True|False}]
        [/DNSSuffix:dnsSuffix]
   | /Delete 
        /Name:name
        [/NoPrompt]
   | /Edit 
        /Name:name
        {[/AutoProvision:{True|False}] 
        [/LabEnvironmentPlacementPolicy:{Conservative|Aggressive}] 
        [/DNSSuffix:dnsSuffix]}
        [/NoPrompt]]
   | /List
   | /ListSCVmmHostGroups }

Option

Description

CollectionName: collectionName

Required. The name of the team project collection on the application-tier Team Foundation Server.

Add

Adds the specified SCVMM host group to the team project collection host groups. You must specify the /SCVmmHostGroup and /Name options with Add.

Delete

Removes the specified host group from the team project collection. You must specify the /Name option with Delete.

Edit

Sets one or both of the Lab Management AutoProvision and LabEnvironmentPlacementPolicy properties for the host group.

You must specify the /Name option and at least one of the /AutoProvision or /LabEnvironmentPlacementPolicy options with Edit.

SCVMMHostGroup:vmmH ostGroupPath

Required with the /Add option. Specifies the host path of the SCVMM host group.

Name: name

Required with the /Add, /Delete, or /Edit options. Specify the name of the team project collection host group to add, delete, or edit.

AutoProvision:{True|False}

Optional with the /Add or /Edit options. Sets (True) or clears (False) the AutoProvision property of the host group. AutoProvision specifies whether the host group is automatically assigned to each team project in the collection. By default, host groups are assigned to the team projects in a collection when you use the TfsConfig Lab/HostGroup command.

LabEnvironmentPlacementPolicy:{Conservative|Aggressive}

Optional with the /Add or /Edit options. Specifies how Lab Management treats the physical machines in a host group on which it deploys new virtual lab environments.

  • Conservative (Default). Consider non-running virtual environments in deployment decisions. This includes all virtual machines which are part of environments which are in "Stopped" state also.

  • Aggressive Do not consider non-running virtual environments in deployment decisions.

DNSSuffix:[dnsSuffix]

Optional. Sets or the DNS suffix of the virtual computers in the host group.

  • If the /DNSSuffix: option is specified without a dnsSuffix value, sets or resets the DNS suffix the suffix of the virtual computers to the suffix of the host computer in the host group.

  • If the /DNSSuffix option is not specified with the /Add option, the suffix of virtual computers are set to the suffixes of the their host computers in the host group.

  • If the /DNSSuffix option is not specified with the /Edit option, the suffix of virtual computers is not changed.

NoPrompt

Optional with the /Delete or /Edit options. Do not prompt user for confirmation.

List

Displays the host groups assigned to the team project collection.

ListSCVmmHostGroups

Displays the host groups available from SCVMM.

Remarks

Host groups are containers that an administrator creates within SCVMM to group a set of virtual machine hosts for easy management. Host groups are hierarchical; a host group can contain other host groups.

Each host group is identified by its host path, a sequence of host group names that specifies the location of a host or host group within the hierarchy of host groups in SCVMM. All host paths begin with the root host group. For example, the host path All Hosts\\New York\\Site21\\VMHost05 indicates that the host VMHost05 belongs to the host group Site21, which is a child host group of the host group New York.

Use only one of the /Add, /Delete, or /Edit options on a command line. Use separate TfsConfig Lab /HostGroup command lines to assign multiple host groups to a team project collection.

You can also use TfsConfig Lab /HostGroup commands to set properties that are specific to Lab Management:

  • AutoProvision specifies whether the host group is assigned to each team project in the team project collection. By default, AutoProvision is on. To assign a host group in a project collection to an individual team project, use the TFSLabConfig CreateTeamProjectHostGroup Command.

    • True (Default). The host group is assigned to each team project in the team project collection.

    • False. The host group is not assigned to each team project in the team project collection.

  • LabEnvironmentPlacementPolicy specifies whether Lab Management considers the existing virtual machines when it deploys new environments on a physical machine in a host group.

    • Conservative (Default). Consider non-running virtual environments in deployment decisions. This includes all virtual machines that are part of environments and that are in "Stopped" state also.

    • Aggressive Do not consider non-running virtual environments in deployment decisions.

  • DNSSuffix specifies a DNS suffix to use for the virtual computers created in the host group. The following table describes how the DNS suffixes of virtual computers are affected by the /DNSSuffix setting.

DNSSuffix/Add/Edit
DNSSuffix: dnsValueThe DNS suffix is set to dnsValue.The DNS suffix is set to dnsValue.
DNSSuffix:The DNS suffix is inherited from host computer.The existing suffix value is removed and the DNS suffix is inherited from host computer.
<Not Specified>The DNS suffix is inherited from host computer.DNS suffix not changed.

Example

In the following example a SCVMM host group is assigned to a team project collection. Because the /AutoProvision options is not specified, the host group is automatically assigned to all team projects in the collection.

tfsconfig lab /hostgroup /add /scvmmhostgroup:"All Hosts\Lab1\HostGroup1" /collection:Collection0
    /name:Lab1Collection0_Lab1_HostGroup1

Lab /libraryshare

You can use the TfsConfig Lab /LibraryShare command to add, remove, or edit the assignment of a library share from System Center Virtual Machine Manager (SCVMM) to a team project collection. You can also use this command set properties that are specific to Visual Studio Lab Management and to display the library shares that are currently assigned to a collection in Lab Management or to display all the library shares in SCVMM.

TfsConfig Lab /LibraryShare
    /CollectionName:collectionName
    { /Add 
        /SCVMMLibraryShare:librarySharePath 
        /Name:name 
        [/AutoProvision:{True|False}]
    | /Delete 
        /Name:name 
        [/NoPrompt]
    | /Edit 
        /Name:name 
        /AutoProvision:{True|False} 
        [/NoPrompt]
    | /List
    | /ListSCVMMLibraryShares }
OptionDescription
AddAdds the specified library share to the team project collection. You must specify the /SCVMMLibraryShare and /Name options with Add.
DeleteRemoves the specified library share from the team project collection. You must specify the /Name option with Delete.
EditSets or clears the AutoProvision property of the library share. You must specify the /Name and /AutoProvision options with Edit.

By default, library shares are assigned to the team projects in a collection.

Note: Changing auto-provision does impact existing team projects.
CollectionName: collectionNameRequired. Specify the name of the team project collection on the application-tier Team Foundation Server.
SCVMMLibraryShare: librarysharePathRequired with Add. Specifies the path to the Virtual Machine Manager library share.
Name: libraryShareNameRequired with Add, Delete, and Edit. Specifies the name of library share in the team project collection.
AutoProvisionOptional with Add; required with Edit. Specifies whether the library shares are automatically assigned to each team project in the collection. By default, library shares are assigned to the team projects.
NoPromptOptional with Add and Edit. Do not prompt the user for confirmation.
ListLists all library shares that are assigned to the specified team project collection.
ListSCVMMLibrarySharesLists all library shares that are available in Virtual Machine Manager.

Remarks

A library share is a designated share on a Virtual Machine Manager library server. A library share provides access to file-based resources for virtual Lab Management environments that are stored on your library servers, such as ISO images and virtual hard disks. Library shares are created in Virtual Machine Manager. Visual Studio Lab Management uses library shares to provision virtual machines in the lab.

Use only one of the /Add, /Edit, or /Delete options on a TfsConfig Lab /LibraryShare command line. Use separate TfsConfig Lab /LibraryShare command lines to assign multiple library shares to a collection.

By default, library shares in a team project collection are automatically assigned to each of the team projects in the collection. You can use the /AutoProvision option with the /Add and /Edit commands to change the library shares are assigned.

  • Set the /AutoProvision option to False to disable the automatic assignment of the library share to team projects. To assign or remove a library share in an individual team project, use the TfsLabConfigTFSLabConfig CreateTeamProjectLibraryShare Command.

  • Set the /AutoProvision option to True to enable the automatic assignments.


Lab /settings

You can configure Visual Studio Lab Management by using the TFSConfig Lab /Settings option. The Settings option

  • Sets the name of the System Center Virtual Machine Manager (SCVMM) Server that controls the administration of virtual machines in your lab.

  • Sets the network location, such as the network domain or workgroup, that the physical computers in all host groups can connect to.

  • Sets the IP addresses and virtual DNS suffix for network-isolated networks in your lab.

    TfsConfig Lab /Settings

       [/ScVmmServerName:VMMServerName]
       [/NetworkLocation:networkLocation]
       [/IpBlock:networkIsolationIpRange]
       [/DnsSuffix:networkIsolationDnsSuffix] 
       [/NoPrompt]
       [/List]
    
OptionDescription
ScvmmServerName: VMMServerNameOptional. Sets the fully qualified name of the System Center Virtual Machine Manager 2008 (SCVMM) server that will be used by Team Foundation Server. This is the name of the SCVMM server that will be used to manage the virtual machines.For Team Foundation Server to communicate with SCVMM, you must add the account under which Team Foundation Server is running to the Administrator role in SCVMM.
NetworkLocation: networkLocationOptional. Sets the fully qualified name of a network, such as a network domain or workgroup, that is available on all the hosts in your lab network. When it provisions a virtual machine, Lab Management automatically connects the virtual machine to the specified network. You can find the available network locations on a host using SCVMM Administrator Console.
IpBlock: networkIsolationIpRangeOptional. Sets the range of IP addresses to be assigned to the virtual machines in an environment when an isolated network is created. Because the IP addresses are used only for internal routing among virtual machines and are not exposed beyond the boundaries of an environment, you can specify any IP range that is not used within the network specified by the /NetworkLocation option. In most cases, the default range of 192.168.23.0/24 should work. If you encounter problems connecting to network isolated environments, you might have to choose a different range.
DnsSuffix: networkIsolationDnsSuffixOptional. Sets the DNS suffix that will be used to register the names of virtual machines on the isolated network for the virtual environment. To confirm that the suffix is configured correctly in the DNS hierarchy, contact your network administrator.
NoPromptOptional. Do not prompt for confirmation. Do not use with the /List option.
ListLists the current configuration values for Lab Management.

Remarks

One of the /ScvmmServerName, /NetworkLocation, /IpBlock, /DnsSuffix, or /List options must be specified on each TfsConfig Lab /Settings command line.

To set up Lab Management, you must specify both /ScVmmServerName and the /NetworkLocation options. However, you can specify these options on separate command lines.

To set up network isolation, you must specify both the /IpBlock and /DnsSuffix options. However, you can specify these options on separate command lines.

Network isolation enables you to use multiple copies of a virtual machine without machine name or IP address conflicts. You must assign both a DNS suffix and an IP range for an isolated network. Because the IP addresses are used only for internal routing among virtual machines and are not exposed beyond the boundaries of an environment, you can specify any IP range that is not used within your public network. In most cases, the default range of 192.168.1.0/24 should work. If you encounter problems connecting to network-isolated environments, you might have to choose a different range.

Examples

In the this example, Lab Management is set up by using the /ScvmmServerName and /NetworkLocation options on a single command line.

tfsconfig lab /settings /scvmmservername:vmmserver /networklocation:lab1.contoso.com

In this example, network isolation is configured by using the /IpBlock and /DNSSuffix options on separate command lines.

tfsconfig lab /settings /ipblock: 192.168.23.0/24
tfsconfig lab /settings /dnssuffix:virtual1.lab1.contoso.com

OfflineDetach

Command availability: TFS 2015 Update 3 and newer

You use the OfflineDetach command to make an offline collection database into a detached offline collection database.

TFSConfig offlineDetach /configurationDB:DatabaseName
    /collectionDB:DatabaseName
OptionDescription
/configurationDBSpecifies the name of the configuration database to be used.
/collectionDBSpecifies the name of the collection database to be detached.

Required permissions

To use the OfflineDetach command, you must be a member of the sysadmin role for the specified SQL Server instance.

Remarks

This command modifies the schema of the specified collection database and should never be run against databases which are in use by a Team Foundation Server deployment. If your databases are in use by a Team Foundation Server deployment, use TfsConfig collection /detach instead.

This command is useful when you need to restore an individual collection database from backup without restoring other collection databases that are part of the same TFS deployment. Previously this required restoring a complete and consistent set of databases (configuration and all collections) to a staging environment, configuring a TFS deployment using those databases, and detaching the one collection of interest.

Instead, you can now restore consistent copies of the configuration database and the collection database of interest and run the OfflineDetach command. The detached collection database can then be attached to any TFS deployment at an appropriate version.

Example

The following example illustrates detaching a collection database named TFS_PrimaryCollection, using a configuration database named TFS_Configuration, with both on a SQL instance running on a server named "ContosoTemp" on the named instance "Backups".

    TFSConfig offlineDetach /configDB:ContosoTemp\Backups;TFS_Configuration /collectionDB:ContosoTemp\Backups;TFS_PrimaryCollection

PrepareClone

Command availability: TFS 2015 and TFS 2013

The PrepareClone command removes information about scheduled backups, SharePoint, and reporting resources from a Team Foundation Server (TFS) deployment. This command is used in two circumstances:

  • when you move a deployment to new hardware but want to keep using the old deployment
  • when you clone a TFS deployment

In either of these cases it is critical to run this command. If you don't, the original resources will be used by both the original and the new servers. If both the original and the new servers are live and point to the same SharePoint or reporting resources for any amount of time, you could end up with corrupted databases.

Important:
This command should be run before configuration, whether you move or clone TFS. If you run it after configuration, you could end up with inconsistencies between content in your databases and content in your web.config file. These inconsistencies might take your server offline. If you have already configured your moved or cloned TFS deployment and realize you need to run the command, follow these steps. First, quiesce your server. Next, run PrepareClone command, ChangeServerID command, and then RemapDBs command. Finally, unquiesce your server.

TFSConfig PrepareClone /SQLInstance:ServerName /DatabaseName:TFSConfigurationDatabaseName
    [/notificationURL: TFSURL] [/usesqlalwayson]
OptionWhat it does
/DatabaseNameSpecifies the name of the server that hosts the database that you want to map for TFS, in addition to the name of the configuration database itself.
/SQLInstance: ServerName Specifies the name of the server that you want to map as a server that hosts one or more databases for TFS. If an instance other than the default instance hosts a database, you must also specify the name of the instance. Use this format: ServerName </strong> InstanceName.
/NotificationURL: TFSURLOptional. Specifies The notification URL for the application-tier server.
/usesqlalwayson Optional. Specifies that the databases are part of an AlwaysOn Availability Group in SQL Server. If configured, this option sets MultiSubnetFailover in the connection string.

For more information, see AlwaysOn Availability Groups (SQL Server).

Required Permissions

To use the PrepareClone command, you must be a member of the Team Foundation Administrators security group and a member of the sysadmin security group for any SQL Server databases that Team Foundation Server uses. For more information, see Permission reference for Team Foundation Server.

Remarks

You use the PrepareClone command to reconfigure TFS when you move the original installation to new hardware and want to continue to use the original deployment TFS and hardware, or when you want to clone your TFS deployment for testing purposes. You use TFSConfig PrepareClone in conjunction with TFSConfig RemapDBs and TFSConfig ChangeServerID to support the cloning configuration.

Example

The following example shows how to use the command on a moved TFS named NewFabrikamTFS to remove old backup, reporting, and SharePoint resource information. If this information isn't removed, the original deployment of TFS still uses those same resources and databases become corrupt. In the example, the SQL Server supporting the moved TFS is also named NewFabrikamTFS, and the instance is the default instance, so no specific instance information is required, just the server name.

TFSConfig PrepareClone /SQLInstance:NewFabrikamTFS /DatabaseName:TFS_Configuration

Proxy

Command availability: TFS 2015, TFS 2013, and TFS 2012

You can use the TFSConfig Proxy command to update or change the settings used by Team Foundation Server Proxy. Team Foundation Server Proxy provides support for distributed teams to use version control by managing a cache of downloaded version control files in the location of the distributed team. By configuring Team Foundation Server Proxy, you can significantly reduce the bandwidth needed across wide area connections. In addition, you do not have to manage downloading and caching of version files; management of the files is transparent to the developer who is using the files. Meanwhile, any metadata exchanges and file uploads continue to appear in Team Foundation Server (TFS). If you use the Visual Studio Team Services to host your development project in the cloud, you can use the Proxy command to not only manage the cache for projects in the hosted collection, but also to manage some of the settings used by that service.

For more information about installing Team Foundation Server Proxy and initial configuration of the proxy, see How to: Install Team Foundation Proxy and set up a remote site . For more information about configuring proxy on client computers, see Team Foundation Version Control Command Reference.

TFSConfig Proxy /add|delete|change [/Collection:TeamProjectCollectionURL /account:AccountName]
    /Server:TeamFoundationServerURL [/Continue]
OptionDescription
/add Adds the specified server or collection to the proxy list in the Proxy.config file. You can run /add multiple times to include more collections or servers. When using /add with a collection hosted on Visual Studio Team Services, you will be prompted for your credentials on Visual Studio Team Services.
/change Changes the credentials stored as the service account for Visual Studio Team Services. The /change option is only used for Visual Studio Team Services; it should not be used for local deployments of TFS.
/deleteRemoves the specified server or collection from the proxy list in the Proxy.config file.
/account Specifies the account used as the service account for the proxy in Visual Studio Team Services. This option is only used for Visual Studio Team Services in conjunction with the /change option.

The default service account used for Visual Studio Team Services is "Account Service."
/continueContinues the execution of the command even if the verification process produces warnings.
/Collection:TeamProjectCollectionURLSpecifies the URL of the team project collection that is hosted on Visual Studio Team Services, in AccountName.DomainName/CollectionName format.
/account:AccountName Specifies the name of the account that is used as the service account for Visual Studio Team Services. If the account name has spaces, the name must be enclosed within quotation marks (""). All special characters in account names must be specified in accordance with command-line syntax.
/account:ServerURLSpecifies the URL of a TFS deployment, in ServerURL:Port/tfs format.

Required permissions

To use the Proxy command, you must be a member of the Team Foundation Administrators security group and an administrator on the proxy server. For more information, see Permission reference for Team Foundation Server .

Remarks

You use the Proxy command to update the existing configuration of Team Foundation Server Proxy. You cannot use the Proxy command for initial installation and configuration of the proxy.

Examples

The following example shows how to add a TFS deployment named FABRIKAM to the proxy list.

TFSConfig Proxy /add /Server:http://www.fabrikam.com:8080/tfs 

The following example shows how to add a team project collection hosted on Visual Studio Team Services to the proxy list. The collection is named PhoneSaver and the account name used for Visual Studio Team Services is HelenaPetersen.fabrikam.com. Because the /account option is not specified, the default service account will be used.

TFSConfig Proxy /add /Collection:https://HelenaPetersen.tfs.visualstudio.com/PhoneSaver 

The following example shows how to change the service account used by the proxy for the team project collection hosted on Visual Studio Team Services. The collection is named PhoneSaver, the account name used for Visual Studio Team Services is HelenaPetersen.fabrikam.com, and the service account used by the proxy is being changed to "My Proxy Service Account". Because the account name contains spaces, quotation marks are used to enclose the name.

TFSConfig Proxy /change /Collection:https://HelenaPetersen.tfs.visualstudio.com/PhoneSaver
    /account:"My Proxy Service Account"

RebuildWarehouse

You can use the RebuildWarehouse command to rebuild the SQL Server Reporting Services and SQL Server Analysis Services databases that Visual Studio Team Foundation Server (TFS) uses.

TFSConfig RebuildWarehouse /analysisServices | /all [/ReportingDataSourcePassword:Password]
OptionDescription
/analysisServices Required if /all is not used. Specifies that only the database for Analysis Services will be rebuilt. If no database exists for Analysis Services, you must also use the /reportingDataSourcePassword option.
/all Required if /analysisServices is not used. Specifies that all reporting and analysis databases that TFS uses will be rebuilt.
/reportingDataSourcePassword: Password Required if the TFS_Analysis database does not exist. Specifies the password of the account that is used as the data sources account for SQL Server Reporting Services (TFSReports). For more information, see Service accounts and dependencies in Team Foundation Server.

Required Permissions

To use the RebuildWarehouse command, you must be a member of the following groups:

  • the Team Foundation Administrators security group and the Administrators security group on the server or servers that are running the administration console for Team Foundation

  • the sysadmin group on the server or servers that are running the instance of SQL Server that hosts the databases for TFS

For more information, see Permission reference for Team Foundation Server.

Remarks

You might use this command when moving or splitting a team project collection, restoring data, or otherwise changing the configuration of your deployment.

To start the rebuild of these databases interactively, you can use the Reporting node in the administration console for Team Foundation. For more information, see Open the Team Foundation Administration Console>.

Example

The following example shows how to rebuild the Analysis Services database for a deployment of TFS.

TFSConfig RebuildWarehouse /analysisServices

TFSConfig - Team Foundation Server Configuration Tool
Copyright � Microsoft Corporation. All rights reserved.
The Analysis Services database was successfully rebuilt.

RegisterDB

Use RegisterDB to update name of the server that hosts the configuration database in Visual Studio Team Foundation Server (TFS). You might use this command when restoring the configuration database to new hardware or when changing the domain of a deployment.

TFSConfig RegisterDB /SQLInstance:ServerName /databaseName: DatabaseName [/usesqlalwayson]
ArgumentDescription
/SQLInstance: ServerName Required. Specifies the name of the server that is running SQL Server and the name of the instance if you want to use an instance other than the default instance. If you specify an instance, you must use the format: ServerName\InstanceName.
/databaseName: DatabaseNameRequired. Specifies the name of the configuration database. By default, this is Tfs_Configuration.
/usesqlalwayson Optional. Specifies that the databases are part of an AlwaysOn Availability Group in SQL Server. If configured, this option sets MultiSubnetFailover in the connection string.

For more information, see AlwaysOn Availability Groups (SQL Server).

Required Permissions

To use the RegisterDB command, you must be a member of the Team Foundation Administrators group on the application-tier server for Team Foundation and a member of the sysadmin group in SQL Server on the data-tier server for Team Foundation. For more information, see Permission reference for Team Foundation Server.

Remarks

Back up the databases for TFS before you use this command.

For the RegisterDB command to succeed, the following application pools and programs must be running:

  • Team Foundation Server Application Pool (application pool)
  • ReportServer (application pool)
  • SQL Server Reporting Services (program)

You must provide the exact name or address of the configuration database for this command to operate correctly. If you must change the server on which this database is stored, you must ensure that TFS points to the new location.

Example

The following example redirects TFS to a configuration database that is located on the server ContosoMain in the SQL Server instance TeamDatabases.

TFSConfig RegisterDB /SQLInstance:ContosoMain\TeamDatabases /databaseName:Tfs_Configuration

RemapDBs

The RemapDBs command redirects Visual Studio Team Foundation Server (TFS) to its databases when they are stored on more than one server and you are restoring, moving, or otherwise changing the configuration of your deployment. For example, you must redirect TFS to any databases for team project collections if they are hosted on a separate server or servers from the configuration database. You must also redirect TFS to the server or servers that are running SQL Server Analysis Services or SQL Server Reporting Services if those databases are hosted on a separate server or instance from the configuration database.

TFSConfig RemapDBs /DatabaseName:ServerName;DatabaseName /SQLInstances:ServerName1,ServerName2
    [/AnalysisInstance:ServerName] [/AnalysisDatabaseName:DatabaseName]
    [/preview] [/continue] [/usesqlalwayson]
OptionDescription
/DatabaseNameSpecifies the name of the server that hosts the database that you want to map for TFS, in addition to the name of the database itself.
/SQLInstances: ServerName1,ServerName2 Specifies the name of the server that is running SQL Server, in addition to the name of the instance if you want to use an instance other than the default instance.

If you are specifying more than one server, you must use a comma to separate multiple pairs of server and instance names.
/AnalysisInstance: ServerName Optional. Specifies the name of the server and instance that hosts SQL Server Analysis Services. Use this option to specify the server and instance that hosts the Analysis Services database.
/AnalysisDatabaseName: DatabaseName Optional. Specifies the name of the Analysis Services database that you want to use with TFS if you have more than one such database on the server that you specified with the /AnalysisInstance option.
/previewOptional. Displays the actions that you must take to update the configuration.
/continue Optional. Specifies that the RemapDB command should continue even if an error occurs during the attempt to locate one or more databases. If you use the /continue option, any collections whose databases are not found on the server or servers that you specify will be reconfigured to use the server and instance that hosts the configuration database.
/usesqlalwayson Optional. Specifies that the databases are part of an AlwaysOn Availability Group in SQL Server. If configured, this option sets MultiSubnetFailover in the connection string.

For more information, see AlwaysOn Availability Groups (SQL Server).

Required Permissions

To use the RemapDBs command, you must be a member of the Team Foundation Administrators security group and a member of the sysadmin security group for any SQL Server databases that Team Foundation Server uses. For more information, see Permission reference for Team Foundation Server.

Remarks

You use the RemapDBs command to reconfigure TFS to use different servers and instances of SQL Server from the servers and instances in the original installation.

Example

The following example shows how to redirect TFS to its configuration database TFS_Configuration. This database is hosted on ContosoMain on the named instance TeamDatabases. Its project collection databases are stored on both ContosoMain\TeamDatabases and the default instance on Contoso2.

TFSConfig RemapDBs /DatabaseName:ContosoMain\TeamDatabases;TFS_Configuration
    /SQLInstances:ContosoMain\TeamDatabases,Contoso2

RepairJobQueue

Command availability: TFS 2015

You use the RepairJobQueue command to fix scheduled jobs that have stopped running for deployment and collection hosts.

TfsConfig repairJobQueue

Required permissions

To use the RepairJobQueue command, you must be a member of the local administrators group on the machine running TfsConfig. You must also be a member of the sysadmin security role for all the SQL Server instances used by the TFS deployment.

Remarks

You would typically use the RepairJobQueue command if you notice any scheduled jobs are not running.
The command does not take any arguments, and requires the TFS deployment to be configured.

Example

TFSConfig repairJobQueue

Settings

You can use the Settings command to automate changes to the uniform resource locator (URL) that is used by the notification interface and for the server address for Visual Studio Team Foundation Server (TFS). By default, the notification interface URL and the server URL match in TFS, but you can configure separate URLs. For example, you might want to use a different URL for the automatic e-mails that TFS generates. You must run this tool from the application tier to update all servers so that they use the new URLs.

To change these URLs interactively or to just view the current settings, you can use the administration console for Team Foundation. See Configure and manage TFS resources.

TFSConfig Settings [/ServerURL:URL] [/NotificationURL:URL]
OptionDescription
/ServerURL: URLSpecifies the URL of the application-tier server for Team Foundation. This value is stored in the configuration database for Team Foundation.
/NotificationURL: URLSpecifies the URL to use in the text of e-mail alerts, if that URL differs from the URL of the application-tier server for Team Foundation. This value is stored in the configuration database.

Required permissions

You must be a member of the Team Foundation Administrators security group and the Administrators group on the application-tier server. For more information, see Set administrator permissions for Team Foundation Server.

Remarks

The Settings command changes connection information for server-to-server communication in a deployment of TFS. The URL that is specified in /ServerURL must be available to all servers within the deployment.

Example

The following example changes the value of NotificationURL to http://contoso.example.com/tfs and the value of ServerURL to http://contoso.example.com:8080/tfs.

TFSConfig Settings /NotificationURL:http://contoso.example.com/tfs /ServerURL:http://contoso.example.com:8080/tfs

Setup

Command availability: TFS 2015 and TFS 2013

You use the Setup command to uninstall features which are currently configured on the machine where the command is being run.

TfsConfig setup /uninstall:{feature[,feature,...]}
OptionDescription
/uninstall Specifies one or more features to be uninstalled from the machine where the command is being run. Options include: All, ApplicationTier, SharePointExtensions, TeamBuild, VersionControlProxy.

Required permissions

To use the Setup command, you must be a member of the Team Foundation Administrators security group.

Examples

The following example uninstalls all TFS features from the current machine.

TfsConfig setup /uninstall:ALL

The following example uninstalls the application tier and build features from the current machine.

TfsConfig setup /uninstall:ApplicationTier,TeamBuild

Unattend

Command availability: TFS 2015 and TFS 2013

The Unattend command is designed for users who are familiar with Team Foundation Server (TFS) and the configuration process, and who need to install TFS on different machines.

For example, if you use Team Foundation Build, you can use the Unattend command to install multiple build servers using the same configuration file.

Use the Unattend /create option to create an unattend file. This file defines all configuration parameters for a TFS installation. Next, use the Unattend /configure option to actually perform the configuration.

This process allows you to configure TFS from start to finish without having to provide input during the installation process. In the case of multiple installations, this also helps ensure that the exact same configuration parameters are used across multiple servers.

TFSConfig unattend /create|unattend /type:InstallType /unattendfile:ConfigurationFileName [/inputs:Key1=Value1; Key2=Value2;...] [/verify] [/continue]
OptionDescription
/createCreates the unattend file with the name and parameters you specify.
/configure Configures TFS using the unattend file and parameters you specify. You must use /type or /unattendfile with this option.
/type:InstallTyoe

Specifies the type of configuration to use.

  • Basic: Configures TFS in the basic configuration, including SQL Server Express.

  • Standard: Configures TFS in the standard single-server configuration.

  • ATOnly: Configures an additional application-tier for an existing TFS deployment.

  • Build: Configures the Team Foundation Build Service.

  • Proxy: Configures Team Foundation Server Proxy.

  • SPInstall: Installs and configures SharePoint Foundation 2013 for use with a TFS deployment.

  • Upgrade: Upgrades a previous version of Team Foundation Server to the latest version of the software.

    You must have downloaded and installed that version locally before running this command with /configure.

  • SPExtensions: Configures the SharePoint Extensions for Team Foundation Server.

When you use /configure, either /type or /unattendfile are required, but you cannot use both.

/unattendfile:ConfigurationFileNameSpecifies the unattend file to create or use, depending on whether the initial parameter is /create or /configure. When you use /configure, either /unattendfile or /type is required.
/inputs:Key1=Value1; Key2=Value2;... Optional. If you use /create, specifies settings and values to use when creating the unattend file. If you use /configurespecifies additional settings and values to use in conjunction with the unattend file.

As an alternative to using /inputs, you can manually edit the unattend file in any plain-text editor. This is necessary for certain input types, such as ServiceAccountPassword , as the password cannot be set using the /inputs parameter.
/verify Optional. Specifies a configuration run that only completes verification checks based on the unattend file, inputs, and configuration type. This is an alternative to performing a complete configuration.
/continueOptional. Specifies that /create or /configure should continue regardless of warnings from verification checks.
/?Optional. Provides command-line help for the unattend command.

Required permissions

  • You must be a member of the Administrators group on the computer where you are installing the software.

  • Depending on the type of installation, you might also require additional administrator permissions. For example, if you are using the Unattend command to install Team Foundation Server, you must be a member of the sysadmin group on the instance of SQL Server that will support TFS. For more information, see the Q & A section of Set administrator permissions for Team Foundation Server.

Remarks

Before you can use the Unattend command to configure TFS, you must create the service accounts that you will use as part of your deployment. You must also install any prerequisite software for your chosen installation type. This includes TFS itself. You must install TFS but you don't have to configure it because the Unattend command will do that for you.

The Unattend command configures TFS components. It does not perform the initial installation of the software. It configures the software according to your specifications after the bits are present on the computer.

Examples

The following example shows how to create an unattend file for a basic installation of Team Foundation Server.

TFSConfig Unattend /create /type:basic /unattendfile:configTFSBasic.ini

In this example, the unattend file is created in the same directory as the command. A log file is created as part of the command, and the location of the file is returned in the command as part of executing the command.

The following example shows how to create an unattend file for the configuration of Team Foundation Build on a server using "FabrikamFiber\BuildSVC" as the build service account, and then configure Team Foundation Build using that unattend file.

Important:
In this example, after creating the unattend file, the administrator manually edits the file to specify the password for the build service account. Adding the password as an input using "ServiceAccountPassword=Password" doesn't add the password information to the file.

TFSConfig Unattend /create /type:build /unattendfile:configTFSBuild.ini
    /inputs:IsServiceAccountBuiltIn=false;ServiceAccountName=FabrikamFiber\\BuildSVCTFSConfig
    Unattend /configure /unattendfile:configTFSBuild.ini

The first command returns the following:

Microsoft (R) TfsConfig - Team Foundation Server Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.

Command: unattend
Logging sent to file C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs\TFS_Build Configuration_0512_203133.log

The second command returns the following information, including the name of the server where Team Foundation Build was configured (FabrikamFiberTFS) and the team project collection associated with the controller (DefaultCollection):

Microsoft (R) TfsConfig - Team Foundation Server Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.

Command: unattend

---------------------------------------------
        Inputs:
---------------------------------------------

Feedback
        Send Feedback: True

Build Resources
        Configuration Type: create
        Agent Count: 1
        New Controller Name: FabrikamFiberTFS - Controller
        Clean Up Resources: False

Team Project Collection
        Collection URL: http://FabrikamFiberTFS:8080/tfs/defaultcollection

Windows Service
        Service Account: FabrikamFiber\BuildSVC
        Service Password: ********

Advanced Settings *
        Port: 9191


---------------------------------------------
        Running Readiness Checks
---------------------------------------------

[1/2] System Verifications
[2/2] Build Service Verifications

---------------------------------------------
        Configuring
---------------------------------------------

        root
[1/4] Install Team Foundation Build Service
        Installing Windows services ...
        Adding service account to groups ...
        Setting ACL on a windows service
[2/4] Enable Event Logging
        Adding event log sources ...
        Token replace a config file
        RegisterBuildEtwProvider
        Configuring ETW event sources ...
[3/4] Register with Team Foundation Server
        Registering the build service
[4/4] Start Team Foundation Build Service
        StartBuildHost
        Starting Windows services ...
        Marking feature configured status
[Info] [Register with Team Foundation Server] Firewall exception added for port
9191


TeamBuild completed successfully.
Logging sent to file C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs\TFS_Build Configuration_0512_203322.log

Deprecated commands

License

Command availability: TFS 2015 | TFS 2013 | TFS 2012 | TFS 2010

You can use the License command to display, modify, or extend the licensing key for your deployment of Visual Studio Team Foundation Server.

TFSConfig License [/ProductKey:Key] [/extend [NewTrialID]]
OptionDescription
/ProductKey: KeySpecifies that the license key for the deployment will be updated with the value of Key.
/extend Specifies that the trial licensing period for Team Foundation Server will be extended by 30 days. This option can be used only once without a getting a new trial ID. If a second extension is required, you must obtain a second trial license from Microsoft.

Required Permissions

To use the License command, you must be a member of the Team Foundation Administrators security group. For more information, see Permission reference for Team Foundation Server.

Remarks

To view, modify, or change the licensing for your deployment interactively, you can use the administration console for Team Foundation. For more information, see Open the Team Foundation Administration Console and Locate or Change the Product Key for Team Foundation Server.

Examples

The following example shows how to view the licensing information for a deployment of Team Foundation Server. In this example, the deployment is using a trial license.

TFSConfig License

TFSConfig - Team Foundation Server Configuration Tool
Copyright © Microsoft Corporation. All rights reserved.
Team Foundation Server Standard license
The following features are installed:
Team Foundation Server
Build Services
Build: 21106.00
Product ID: 01234-567-8910
Trial license with 74 days remaining, expiring on 6/30/2010
Trial ID: ABCD-EFGH-IJKL

TCM

Command availability: TFS 2015 | TFS 2013 | TFS 2012 | TFS 2010

When upgrading to the latest version of TFS, the system automatically attempts to upgrade the Tests Management components, including test plans and suites. If the automatic migration fails, use the TCM command to upgrade your test plans and test suites manually to their respective work item types (WITs).

TFSConfig TCM /upgradeTestPlans|upgradeStatus /CollectionName:CollectionName /TeamProject:TeamProjectName
OptionDescription
/upgradeTestPlans Required unless /upgradeStatus is used.

Converts existing test plan and test suites to point to the work item-based test plans and test suites. It also updates existing test management data and links between other existing test artifacts such as test points, test runs, and test results.
/upgradeStatus Required unless /upgradeTestPlans is used.

Reports the migration status of test data for the specified team project. It will also indicate whether the specified project has any test plans.
/CollectionName:CollectionName Required. Specifies the project collection that contains the team project for which you want to migrate test data or check the migration status.

If there are spaces in the name of the team project collection, enclose the name in quotation marks, for example, "Fabrikam Fiber Collection".
/TeamProjectName:TeamProjectName Required. Specifies the team project for which you want to migrate test data or check the migration status. This team project must be defined in the collection that you specified by using the /collectionName parameter.

If there are spaces in the name of the team project, enclose the name in quotation marks, for example, "My Team Project".

Required permissions

You must be a member of the Team Foundation Administrators security group, and an administrator on the application-tier server. See Set administrator permissions for Team Foundation Server.

Remarks

Your application-tier server must be upgraded to the latest version of TFS to use this command.

Before you can use the TCM command, you must first import the test plan work item definition and the test plan category into the project. To learn more about the migration and when to use this command, see Manual updates to support test management.

The TCM command is applied to individual team projects. If you need to upgrade test plans in more than one team project, you will have to run it against each team project individually.

You must run the TCM command from the tools directory for TFS. By default, that location is: drive:\%programfiles%\Microsoft Team Foundation Server 12.0\Tools.

You use the TCM command only in the event that automatic migration of existing test data fails. To learn more about the migration and when to use this command, Manual updates to support test management.

If you can't access test plans or test suites that were defined before the server upgrade occurred, run TFSConfig TCM upgradeStatus to determine the status of the migration.

You run the TCM command for an individual team project. If you need to upgrade more than one team project, you will have to run it against each team project in turn.

Examples

The following example shows how to check the status of test plan upgrade on the Fabrikam Fiber project hosted on the default team project collection (DefaultCollection):

tfsconfig tcm /upgradeStatus /CollectionName:DefaultCollection /TeamProject:"Fabrikam Fiber"

Import

The import command was deprecated in TFS 2013. Earlier versions are available here:

If you need assistance with upgrading data and projects from an earlier version of Team Foundation Server (TFS), see Upgrade Team Foundation Server, or contact Microsoft Support.

PrepareSQL

The prepareSQL command was depracated in TFS 2012. Earlier versions are available here:

Repair

The repair command was depracated in TFS 2012. Earlier versions are available here:

If you need to repair your stored procedures after a failed database patch, contact Microsoft Support.

Diagnose

The diagnose command was deprecated in TFS 2013. Earlier versions are available here:

If you need assistance with diagnosing potential mismatches between software updates on your application-tier and data-tier servers for Team Foundation Server (TFS), contact Microsoft Support.

Updates

The updates command was deprecated in TFS 2013.Earlier versions are available here:

If you need assistance with installing any software updates that are missing from the databases for Team Foundation Server (TFS), contact Microsoft Support.

© 2016 Microsoft