Preparing TFS machine for Restoration

Install the following:

  • Windows Server 2008
  • IIS
  • SQL Server 2008 R2
  • TFS 2010

After preparing the machine, perform the following steps:

Step 1:

Open the command prompt as administrator and run the command iisreset /stop


Step 2:

Stop the agent services by running the command net stop TfsJobAgent


Step 3:

Now, from the Backup of SQL Server databases restore the Tfs_Configuration database.

Step 4:

Change the path of the command prompt to the following:

C:Program FilesMicrosoft Team Foundation Server 2010Tools

Next, run the following command:

TFSConfig PrepSQL /SQLInstance: JI-TFS (Where JI-TFS is the instance of SQL – change it according to your SQL instance on the TFS machine.)


The result will be:

Step 5:

Restore all database backups except for Tfs_Configuration database:


Note: Databases displayed in the screenshot are for reference only and will be different in your server.

Step 6:

With the command prompt path set to C:Program FilesMicrosoft Team Foundation Server 2010Tools, run the following command:

TfsConfig registerDb /sqlInstance:JI-TFS /databaseName:Tfs_Configuration


Step 7:

Launch the Team Foundation Server Admin Console, navigate to Application Tier page and click on Reapply Account.


Step 8:

On the Reapply Service Account dialog box, enter credentials of the user account used for installing TFS, and then click OK.


The service account update process will start showing you the progress. Once the process is completed successfully, click Close.


Step 9:

On the command prompt, type the following command to start the Job Agent
net start TfsJobAgent

Next, start IIS


Step 10:

In the Application Tier console, click Change URLs and update the primary URL for accessing your TFS.


Step 11:

In order to change the name of the machine in Application Tier section, clear the check box to see the machine.


The old name will be removed in a period of three days.