Tips, Tricks, Thoughts & Ideas

Team Foundation Server TFSAdminUtil 

Tuesday, March 02, 2010 3:14:00 AM

Another useful tool within the world of Team Foundation Server is the TFSAdminUtil.exe. 
This is a tool that allows a TFS Administrator to perform several valuable configuration type functions.
The tool is located at the following location:

"<drive>:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools\TFSAdminUtil.exe"

There are several options and functions that this tool performs, all of which can be found by
executing the following command that displays the command syntax and options for TFSAdminUtil:

"<drive>:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools\TFSAdminUtil.exe /? | more"  

The results of which can be seen here:


TfsAdminUtil - Team Foundation Admin Utility
Copyright (c) Microsoft Corporation.  All rights reserved.

TfsAdminUtil.exe accepts the following commands:

    activateat [/noprompt | /i] [<server name>]
        Activates the current computer as the Team Foundation
        application-tier server. If the server name is omitted,
        the default server name will be the NETBIOS name of the
        current computer.

    authentication [/provider:NTLM|Negotiate] [/proxy] [/view]
        Displays or configures the settings for the authentication scheme that
        the Web service for Team Foundation Server uses. If the '/proxy' option
        is used, the Team Foundation Server proxy Web service is updated.

    changeaccount [/ra] [/proxy] <old account> <new account> [<new password>] [<email address>]
        Changes an account and the password that is used by Team Foundation
        Server. If the '/ra' option is used, then the Reporting Services
        service account is changed. Otherwise, the default behavior is to
        change the Team Foundation Server service account. If an
        email address is supplied, then the address from which alerts are sent
        is updated.  If the '/proxy' option is used, then the Team Foundation
        Server proxy account is updated.
        Note: The accounts must be in domainname\username format.  For system
        accounts, you must use quotes around the full account name
        (for example, "NT Authority\Network Service"). System accounts do not
        require a password. The email address must be in a
        recognized mail delivery format.


    changepassword [/proxy] <account> <new password>
        Changes the password for the service account used by Team Foundation
        Server.  If the '/proxy' option is used, the Team Foundation Server
        proxy account password is updated.
        Note: The account must be in domainname\username format.

    configureconnections [/View] [/proxy] [/ClientCertificate:(user|machine)]
            [/ATUri:<uri>] [/PublicATUri:<uri>]
            [/SharepointUri:<uri>] [/SharepointSitesUri:<uri>]
            [/SharepointAdminUri:<uri>] [/SharepointUnc:<unc>]
            [/ReportsUri:<uri>] [/ReportServerUri:<uri>]
            [/TSWAUri:<uri>]
        Configures the connection information for Team Foundation Server based
        on the specified new configuration values.  If /View is specified, or
        no option is specified, displays the current settings for the
        connection values.
        If the '/proxy' option is used, only the /ClientCertificate option
        may be used.

    renamedt <computer name>
        Updates the Team Foundation application-tier server to use the
        specified Team Foundation data-tier server.

    sid [/noprompt | /i] [/change <source domain> <target domain>] [<account>]
        Lists or changes the security identifiers (SIDs) stored in Team
        Foundation Server, depending whether or not the '/change' is
        specified. Use computer names as the domains for local accounts. If
        a specific account is not specified, the sid command executes on
        all SIDs in Team Foundation Server.
        Note: The account must be in username format.

    status [/proxy] <account>
        Shows status information for the specified account.  If the '/proxy'
        option is used only the Team Foundation Server proxy status will
        be displayed.
        Note: The account must be in domainname\username format.

Note: To run TfsAdminUtil, you must be an administrator on the Team
    Foundation application-tier and data-tier servers or the proxy server
    if using the /proxy option. It is recommended that you back up the
    databases on the Team Foundation data-tier server.
    If not using the /proxy option, the Team Foundation Server application
    pool on the application-tier server must be stopped before you run
    TFSAdminUtil. Restart the application pool only after you have
    completed all commands.

 The most useful command for me so far has been the need to change the default URL for the Team Project Portal Site Address.  By default TFS seems to use the machine name when installed (if you don't change it then).  This address sets the base URL for the Reporting server and the Documents Server.  Thus, if you want to apply a Fully Qualified Domain Name to the machine name or change the URL in any way (like if you are applying SSL and want to use a different URL), you have the change the URL.  The only way to change the Team Project Portal Site Address is via the "ConfigureConnections" command of the TFSAdminUtil tool. 

Getting Current Configuration for TFS "Connections"

Before doing anything it is probably a good idea to display the current configuration so as to be able to revert things back if you need to.  In order to display the current configuration, type the following command.

TfsAdminUtil ConfigureConnections /view

You should then see something like the following:

TfsAdminUtil - Team Foundation Admin Utility
Copyright (c) Microsoft Corporation.  All rights reserved.

There is no current VSTS client certificate configured.  This is not an error condition.
Current value for ATUri                      = http://<my server url>:8080
There is no current setting for PublicATUri.  This is not an error condition.
Current value for SharepointUri          = http://<my server url>:80
Current value for SharepointSitesUri   = http://<my server url>:80/Sites
Current value for SharepointAdminUri  = http://<my server url>:17012/_vti_adm/admin.asmx
Current value for SharepointUnc         = \\<my server url>\Sites
Current value for ReportsUri               = http://<my server url>/Reports
Current value for ReportServerUri        = http://<my server url>/ReportServer/ReportService.asmx
Current value for Team System Web Access Work Item Editor    =
Current value for Team System Web Access Changeset Details    =
Current value for Team System Web Access Difference    =
Current value for Team System Web Access View    =

Changing URLs for TFS Reporting, SharePoint, etc.

One note on the ConfigureConnections piece of the TfsAdminUtil tool... if you have installed Team Foundation Server 2008 SP1, there is a bug in the process that will register the incorrect Reporting Server URL.  If you have in the to change the Reporting Services Server URL in Team Foundation Server, you should use the following command with the asmx specified:

TfsAdminUtil ConfigureConnections /ReportServerUri:http://<myserver's FQDN url>/ReportServer/ReportService.asmx

(this bug is outlined here: http://support.microsoft.com/kb/959126)

In all other cases, you can simply specify the server and the virtual directory path like the following example for resetting the Reports URL:

TfsAdminUtil ConfigureConnections /ReportsUri:http://<myserver's FQDN url>/Reports
TfsAdminUtil configureconnections /SharepointUri:http://<myserver's FQDN url>
TfsAdminUtil configureconnections /SharepointSitesUri:http://<myserver's FQDN url>/Sites
TfsAdminUtil configureconnections /SharepointAdminUri:http://<myserver
's FQDN url>:17012/_vti_adm/admin.asmx
TfsAdminUtil configureconnections /SharepointUnc:\\<myserver
's FQDN url>\Sites
TfsAdminUtil configureconnections /ATUri:http://<myserver
's FQDN url>:8080

After you run the ConfigureConnections command on the reports or sharepoint URIs, you should see the following:

<drive>:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools>TFSADMINUTIL configureconnections /ReportServerUri:http://<myserver's FQDN url>/ReportServer/ReportService.asmx

TfsAdminUtil - Team Foundation Admin Utility
Copyright (c) Microsoft Corporation.  All rights reserved.

Successfully set SQL ReportServer URI to specified value http://<myserver's FQDN url>/ReportServer/ReportService.asmx
You have changed the Uniform Resource Identifier (URI) for a Windows SharePoint
Services site or SQL Server Reporting Services site. Team Foundation Server depends
on one or more of these sites. You must run the TfsConfigWss command-line utility
on the computer running Windows SharePoint Services before Team Foundation
 Server can function correctly.

Since you changed the URLs, you now have to run the TfsConfigWss tool.  The tool is located at the following:

<drive>:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools\TfsConfigWss.exe

This is an executable that will open the following window:

Tfs

Type in the appropriate information as above (replacing <myserver url> with your server) and click apply. You should then see the following prompt:

Click OK and then "Exit" on the Config screen.

Changing the Build Agent's TFS URL

Changing the URL that the TFS Build Agent will use.  If you want to change the name of the TFS server that the Build Agent uses, you can either do that in the Registry or in the following config file:

<drive>:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\TfsBuildService.exe.config

 This file has various configuration parameters that the Build Agent will use.  This file is useful when configruing the Build Agent to use SSL, but that is another topic for another time.  Anyway, two of the configuration items in this file relate to the URL for the TFS Server that the Build Agent will use.  You can change these two keys to point to the server URLs you configured above (if necessary).  This can be useful if you want or need to use the server's Fully Qualified Domain Name (FQDN). 

Change
<
add key="AllowedTeamServer" value="" />

To
<
add key="AllowedTeamServer" value="https://<myserver's FQDN url>:8080" />.

Change
<
add key="ServerAccessUrl" value="" />

To
<add key="ServerAccessUrl" value="https://<myserver's FQDN url>:8080" /> .

 

 

 



Comments are closed on this post.
   
Printable View © 2001 - 2010 JBC Digital, Inc. Site and Design by JBCDigital, Inc.