Bagikan melalui


TFSLabConfig SetServiceAccount Command

Sets the service account credentials of a team project collection to the specified user in Visual Studio Team Foundation Server. The service account is added to the following team project collection groups:

  • Build Service - for deployment activities in the build agent and access to drop locations.

  • Test Service - for authorization of communication between test agents and test controllers.

The service account is used by test agents and build agents in a team project collection to communicate with test and build controllers.

Note

The credentials of the service account are not secured in Team Foundation Server. The service account should be created with the minimum rights on the system. The SetServiceAccount command grants the specified user the permissions that are required to enable communication between agents and controllers.

Required Permissions

To use the SetServiceAccount command, you must have the Manage Lab Locations permission at the Team Project Collection Host Group level. By default, the members of the TFS Administrators and Project Collection Administrators groups have this permission. For more information, see Team Foundation Server Permissions.

TFSLabConfig SetServiceAccount
    /Collection:collectionURL
    /User:userName

Options

Option

Description

Collection:collectionUrl

Required. The URL of the team project collection on the application-tier of Team Foundation Server to associate with the service account.

User:userName

Required. The domain, if necessary, and user name of the service account.

Remarks

The SetServiceAccount command replaces any existing service account credentials in the team project collection configuration. However, the credentials that are used in deployed environments are not replaced. Use the UpdateCredentialsOnDeployedEnvironments command to replace the credentials in existing environments.

Description

For increased readability in the example, command options are listed on separate lines. In a command prompt window, type all options for a command on the same line.

This example adds a service account for a team project collection.

Code

TFSLabConfig SetServiceAccount
    /collection:http://contoso:8080/TFS/DefaultCollection 
    /user:contoso\user1

See Also

Concepts

TFSLabConfig Command Reference

TFSConfig Lab Command Reference

Configuring and Administering Lab Management