How to: Change the Build Service Account

Changing the build service account requires that you log on to the build computer and use the Windows administrative console to replace the old account with a new one. If you have installed Team Foundation Build on more than one build computer, you must repeat this procedure on each of them. 

After you have changed the account you are using for the Visual Studio Team Foundation Build service, you must configure a new build service account. Also, before Team Foundation can connect to the new build service account, you must add it to the Build Services security group. For more information about how to add the build service account to Team Foundation Server, see How to: Add the Build Service Account to the Build Services Security Group.

Note

You cannot use the TFSAdminUtil Changeaccount command to change the account for the build service.

Required Permissions

To perform these procedures, you must be a member of the Administrators group on the Team Foundation application-tier computer, and a member of the Windows Administrators group on the build computer. For more information about permissions, see Team Foundation Server Permissions.

To stop Visual Studio Team Foundation Build service

  1. On the build computer, click Start, click Administrative Tools, and then click Services.

  2. In the Services (Local) pane, right-click Visual Studio Team Foundation Build, and then click Properties.

  3. On the General tab, under Service Status on the Visual Studio Team Foundation Build Properties (Local Computer), click Stop.

To change the build service account on the build computer

  1. In the Services (Local) pane, right-click Visual Studio Team Foundation Build, and then click Properties.

  2. In the Visual Studio Team Foundation Build Properties (Local Computer) dialog box, click the Log On tab.

  3. On the Log On tab, select the This account option, and then click Browse.

  4. In the Select User dialog box, click Object Types. In the Object Types dialog box:

    1. Select Users if you are adding a domain or workgroup account.

    2. Select Built-in security principals if you are adding a network service account.

  5. Click OK.

  6. In the Select User dialog box, type the domain, workgroup, or network account in the Enter the object to select box. You can optionally select Check Names to verify that you typed the account name correctly. Click OK.

    You can also use the Locations and Advanced options to search for the account you want to use. For example, if you are configuring Visual Studio Team Foundation Build service to use a network account, click Locations. In the Locations dialog box, select your build computer name, and then click OK. In the Select User dialog box, click Advanced, and then click Find Now. In the Search Results pane, select NETWORK SERVICE, and then click OK. This automatically populates the This account text box in the Visual Studio Team Foundation Build Properties (Local Computer) dialog box by using the appropriate name for the network account. This is usually NT AUTHORITY\NetworkService.

  7. In the Visual Studio Team Foundation Build Properties (Local Computer) dialog box:

    • If you are using a domain or a workgroup account, type the password for the new service account in the Password and Confirm password text boxes.

    • If you are using a network account, you do not need to use a password.

  8. Click OK.

Associating the New Build Service Account with the Default Port

After you have changed the account you are using for Visual Studio Team Foundation Build service, you must use the wcfhttpconfig.exe tool to configure the new build service account by using port 9191, the default port for Team Foundation Build.

If you do not first associate port 9191 with the new account when you try to restart Visual Studio Team Foundation Build service, you will receive an "Access denied" message.

To associate the new build service account by using the default port

  1. On the build computer, move to the directory where the wcfhttpconfig.exe tool is located by typing the following at the command prompt:

    cd C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies
    

    Note that the root drive can be different on your computer.

  2. To reserve port 9191 for the new build service account, type the following at the command prompt:

    wcfhttpconfig.exe reserve DOMAIN\User 9191
    

    Replace the DOMAIN\User with the actual service account name.

To restart Visual Studio Team Foundation Build service

  1. On the build computer, in the Services (Local) pane, right-click Visual Studio Team Foundation Build, and then click Properties.

    The Visual Studio Team Foundation Build Properties (Local Computer) dialog box appears.

  2. Under Service Status, click Start.

Note

Before you can use the new build service account to run builds, you must add it to the Build Services security group for your team project. For more information, see How to: Add the Build Service Account to the Build Services Security Group.

See Also

Tasks

How to: Change the Password for Visual Studio Team Foundation Build Service

How to: Set up and Install Team Foundation Build

Reference

ChangeAccount Command

Other Resources

Managing Team Foundation Server Services and Service Accounts