0% found this document useful (0 votes)
54 views39 pages

T Fs Administration Certification

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 39

Team Foundation Server Administration –

Certification (70-496) Preparation

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Contents
Introduction .............................................................................................................................................. 3
Install and configure Team Foundation Server (TFS) .............................................................. 4
Manage Team Foundation Server .................................................................................................... 9
Customize Team Foundation Server for Team Use ................................................................. 21
Administer version control ................................................................................................................ 29
Useful Resources .................................................................................................................................. 38

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Introduction

Administering Visual Studio Team Foundation Server Certification (70-496) is excellent way
to get in-depth knowledge of the product and is extremely helpful in TFS administration.
Sharing below resources which were extremely helpful in passing my certification exam.
While these resources could be helpful in the exam there is no better way to read the
information and practice on a test/non user impacting TFS instance.

Note: Information in this article is for reference purpose only, please go through entire
content available online, in books to get extensive knowledge around each of the topic.

What’s in Exam?

Per Microsoft site https://www.microsoft.com/learning/en-us/exam-70-496.aspx exam is


divided into four quadrants:

1. Install and configure Team Foundation Server (TFS) (25‒30%)


2. Manage Team Foundation Server (25‒30%)
3. Customize Team Foundation Server for team use (20‒25%)
4. Administer version control (25‒30%)

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Install and configure Team Foundation Server (TFS)

Operating System Requirement:

 64-bit Windows Server 2008 with Service Pack 2

 64-bit Windows Server 2008 R2 with Service Pack 1

 64-bit Windows Server 2012

SQL Server Requirement:

 TFS 2012 requires SQL Server 2008 R2 or SQL Server 2012

IIS Requirement:

 IIS is now automatically installed for you by the TFS installer.

Installation Options

TFS 2012 installation options include:


 Basic
 Standard Single server installation
 Advanced
 Application-Tier only
 Upgrading TFS from an earlier release of it
 Build services installation
 Proxy services installation

Configuring SMTP Settings for TFS

 Sending emails is an important capability of Team Foundation Server


 Emails can be configured for TFS Alerts or for sending things such as list of work
items to other users
 You need to ensure your TFS server has been configured with details for an SMTP
server
 You can provide details including SMTP Server, Sender, Credentials, non-standard
ports and SSL.

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Changing the URL (friendly name)

Via TFS Administration UI (On the TFS AT Server)


 On the TFS application-tier, open the administration console for Team Foundation
Server.
 In the navigation bar, choose Application Tier, and then click Change URLs.
The Change URLs window opens.
 In Notification URL, type the URL for the new application-tier server, and then
choose OK.

On the SharePoint Server


 On server running SharePoint, open the administration console for Team Foundation
Server.
 In the navigation bar, choose Extensions for SharePoint Products, select the
SharePoint Web Application and then click Modify access.
The Access for Team Foundation Server window opens.
 In URL for Team Foundation Server, type the URL for the new application-tier server,
and then choose OK.

Upgrade/Move a team project collection

Why:
 You want to expand your deployment of TFS by adding another instance of SQL
Server to it, and you want to distribute existing collections between the instances.
 You have more than one deployment of TFS in your organization, and you want to
move a collection to another deployment to better align with your business needs.
 You want to move the collection to a remote office that has its own deployment of
TFS.
 You want to incrementally upgrade your deployment by detaching an individual team
project collection from a deployment of TFS running an earlier version, and then move
it to a server running the current version of TFS. (In this scenario, you must also then
upgrade each team project within the collection by using the Configure Features
wizard. For more information, see Configure features after a TFS upgrade.

To move a team project collection, you must complete the following procedures in the
sequence listed:

1. Required Permissions
2. Save Reports
3. Delete Lab Management Resources
4. Unmap the Collection from Microsoft Project Server
5. Detach the Collection
6. Back Up the Collection Database
7. Rebuild the Data Warehouse and Analysis Services
8. Prepare to Move the Site Collection Database
9. Move the Site Collection Database
10. Restore the Collection Database

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


11. Attach the Collection
12. Move Reports
13. Reconnect Resources for the SharePoint Web Application
14. Configure the Moved Team Project Collection
15. Configure Lab Management Resources
16. Configure Project Server Integration
17. Configure Projects

Build Controller

To use Team Foundation Build for automated building and testing of your app, you must
first set up a build server, add a build controller and a few build agents, and finally
designate a drop folder.

Each build controller is dedicated to a single team project collection. The build controller
performs some lightweight tasks, such as determining the name of the build, creating the
label in version control, logging notes, and reporting status from the build.

Required Permissions

You must be a member of the Windows Administrators group on the build server, and a
member of the Project Collection Build Administrators group on your team project collection.

Build Agent

Each build agent is dedicated to and controlled by a single build controller. Build agents can
be hosted on the same build server that hosts their build controller, but this is not required,
and in some cases your team’s needs can most efficiently be met by a single build server to
host a build controller that controls build agents on multiple build servers.

The build agent executes the steps of your build process that are contained in the
AgentScope activity. Typically, these steps include getting files from version control,
provisioning the workspace, compiling the code, running tests, and merging files back into
version control.

Team Foundation Build variables

You can use the following variables in a build agent working directory:

• $(BuildAgentId): An automatically generated integer that uniquely identifies a build agent


within a team project collection.

• $(BuildAgentName): The Display Name of the build agent.

• $(BuildDefinitionId): An automatically generated integer that uniquely identifies a build


definition within a team project collection.

• $(BuildDefinitionPath): The team project name and the build definition name, separated
by a backslash.
Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
Lab Management

A lab environment is a collection of virtual and physical machines, which you can use to
develop and test applications. A lab environment can contain multiple roles needed to test
multi-tiered applications, such as workstations, web servers, and database servers. In
addition, you can use a build-deploy-test workflow with your lab environment to automate
the process of building, deploying, and running automated tests on your application.

Why:

1. Use a test plan to run automated tests


2. Use a build-deploy-test workflow
3. Collect diagnostic data from all machines, even during manual testing
4. Automatic test agent installation

With System Center Virtual Machine Manager (SCVMM), you can also get these
benefits when you use lab environments:

 Quickly reproduce machine configurations


 Reproduce the exact conditions of a bug
 Run multiple copies of a lab environment at the same time

Standard Environments Vs SCVMM Environments

There are two types of lab environments that you can create with Visual Studio Lab
Management—standard Environments and SCVMM Environments. However, the capabilities
of each type of environment are different.

Standard Environments: Standard environments can contain a mix of virtual and physical
machines. You can also add virtual machines to a standard environment that are managed
by third-party virtualization frameworks. In addition, standard environments do not require
additional server resources such as an SCVMM server.

SCVMM environments: SCVMM environments can only contain virtual machines that are
managed by SCVMM (System Center Virtual Machine Manager), so the virtual machines in
SCVMM environments can only run on the Hyper-V virtualization framework.

Advantages of SCVMM environment:

 Environment snapshots
 Stored environments
 Network isolation
 Virtual machine templates
 Stored Virtual Machines

Avoiding Computer Name Conflicts:

 Using network isolation.


 Using templates.
 Using stored virtual machines
Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
Naming conflicts occur when two or more computers share domain identifiers such as
computer names or IP addresses. If multiple copies of a virtual machine are running (active)
in a domain or workgroup and share one or more of these identifiers, a naming conflict can,
and frequently will, occur.

System Center Virtual Machine Manager (SCVMM)

To access the virtual machines that you create with Hyper-V from Lab Management, you
must install and configure SCVMM. SCVMM is a tool for managing your Hyper-V host
machines from a central console. Lab Management communicates with SCVMM to be able to
use the virtual machines and templates to create environments. Two versions of System
Center Virtual Machine Manager are supported for Lab Management: SCVMM 2012 or
SCVMM 2008 R2.

Test Agent and Controller

You must use a test controller and test agents to run tests run tests remotely or distribute
automated tests to multiple machines using Visual Studio 2012 or Microsoft Test Manager. A
test controller distributes tests and manages test runs remotely by communicating with test
agents that are installed on each test machine. Each test agent can perform tasks such as
installing software, running tests, and collecting test data.

Why:

 Run automated tests remotely using Visual Studio


 Distribute automated tests to multiple machines using Visual Studio
 Run tests and collect test data remotely using Microsoft Test Manager
 Use a lab environment
 Run tests in lab environment
 Deploy an application in a lab environment using a build-deploy-test workflow

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Manage Team Foundation Server

Create/Manage TPC

You can manage your team projects more efficiently by grouping them together and
assigning the same resources to them. For example, you can group projects that have
similar requirements or objectives, such as all projects that relate to a particular code base.
You can then manage that grouping as an autonomous resource with its own user groups,
server resources, and maintenance schedule. In Team Foundation Server (TFS), you group
team projects together in one or more organizational units called team project collections.
All the artifacts and data that those projects use are stored in the single database of the
collection.

Limitations/Disadvantages:

 Complex architecture
 Increased number of databases to manage
 You cannot link work items across collections.
 You cannot branch or merge code across collections.
 You cannot create queries across collections.

How to Create TPC:

1. Open the administration console for Team Foundation.


Expand the name of the server, expand Application Tier, and choose Team Project
Collections.
2. In Team Project Collections, choose Create Collection.
The Create Team Project Collection wizard opens.
3. In Name, specify a name for your collection. Under Description, you can optionally
specify a brief description of your collection and its purpose. Choose next and follow
the wizard.

Split a Team Project Collection


1. Detach a TPC
2. Copy Original DB and restore with New DB name
3. Attach Original TPC
4. Attach New TPC
5. Clean up Team Projects

Create a Team Project

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


You create a team project for Visual Studio Team Foundation Server (TFS) to provide a
central point for developing a specific software technology or product. A team project
provides a repository for source code and work items.

1. In Team Explorer, choose the Create a New Team Project link, or choose File, New,
Team Project.
The New Team Project wizard appears.
2. On the Specify the Team Project Settings page, type a name for the team project
that you want to create in the What is the name of the team project? box.
You must specify a unique name that is no more than 64 characters. The name should
be descriptive enough that your team members can easily associate it with the
software product. Your team members will use this name to connect to the team
project.
3. (Optional) Type a description of the project in the What is the description of the team
project? text box. The description is stored in Team Foundation Server and provides
the site description for the optional team project portal SharePoint site.
4. Choose the Next button.
5. On the Select a Process Template page, choose a process template from the Which
process template should be used to create the team project? list.
6. If you want to accept the default settings on the remaining wizard pages, choose the
Finish button. Otherwise, choose the Next button.
If you choose the Finish button, the following tasks are performed automatically:
o A SharePoint site for your team project is created when your team project
collection is configured with SharePoint Products.
o An empty version control folder for your team project is created.
7. Complete the Team Site Settings page which appears only when your team project
collection is configured with SharePoint Products:
1. Choose the Create a new SharePoint site radio button if you want to create a
SharePoint site for your project.
2. Choose the Configure radio button to verify or modify the settings for your
SharePoint site.
In the Select Location to Create SharePoint Site dialog box, verify or choose the
URL for the Web application and the Relative site path to which you want to
connect.
8. On the Specify Source Control Settings page, choose one of the following options:
o Choose the Create an empty source control folder radio button to use the
name of the team project for the new folder.
o Choose the Create a new source control branch radio button, and specify the
folder from which you want to branch.
9. On the Confirm Team Project Settings page, review the choices and values that you
specified. If the information is correct, choose the Finish button. Otherwise, choose the
Previous button to make changes.
The New Team Project wizard creates your team project.
10. On the Team Project Creation Status page, view the status messages and status bar
for information about the components that are being created.
11. On the Team Project Created page, if you want to read more details about the work
items, roles, activities, and other aspects of the team process, select the Launch the
process guidance for more information about how to run the team project check box.
12. Choose the Close button.

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools
that SQL Server provides. As of Cumulative Update 2, TFS includes a Scheduled Backups
feature to automatically configure backups. However, you might need to configure backups
manually if your deployment has security restrictions that prevent use of that tool. To
manually back up Team Foundation Server, you must not only back up all databases that
the deployment uses, you must also synchronize the backups to the same point in time. You
can manage this synchronization most effectively if you use marked transactions. If you
routinely mark related transactions in every database that Team Foundation uses, you
establish a series of common recovery points in those databases. If you regularly back up
those databases, you reduce the risk of losing productivity or data because of equipment
failure or other unexpected events.

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation
Server. Even if you back up the application-tier server, you will not back up any data for
Team Foundation Server. However, if the hardware of an application-tier server fails, you
can install another application-tier server and configure it to use the databases for your
deployment. That server will then replace the offline server as the application-tier server for
the deployment. If your application-tier server hosted SharePoint Products, you must also
restore that software on the new hardware.

To install and configure a server as the application-tier server


1. Stop the application pools and services that Team Foundation Server uses.
For more information, see TFSServiceControl Command.
2. If you are using Network Service as the service account for Team Foundation
(TFSService), on the application-tier server, open a Command Prompt window, and
change directories to Drive:%Program Files%\ Microsoft Team Foundation Server
11.0\Tools. At the command prompt, enter the following command:
TfsConfig Accounts /add /account:"NT Authority\Network Service"
/SQLInstance: ServerName /DatabaseName: DatabaseName
3. Install Team Foundation Server on the new server, and start the Application-Tier
Only wizard.
4. If you are using Visual Studio Lab Management, install the System Center Virtual
Machine Manager (SCVMM) Administrator Console on the application tier, and
configure it to connect to the server that is running SCVMM.
For more information, see Configuring Lab Management for SCVMM Environments.
5. If the computer name has changed, open the administration console for Team
Foundation.
6. In the navigation bar, choose Application Tier, and then choose Change URLs.
The Change URLs window opens.
7. In Notification URL, specify the URL for the new application-tier server, and then
choose OK.

Summary:

 Install TFS 2012


Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
 Run the Application-Tier Only wizard from the TFS 2012
 Run the TFS Administration Console
 Choose Application Tier -> Change URLs
 Enter the URL to the new Application Tier

Restore Database Tier

 Restore the databases to a new SQL Server

 Run the TFSConfig RemapDBs command


 TFSConfig RemapDBs /DatabaseName:ServerName;DatabaseName
 /SQLInstances:SQLServerName [/AnalysisInstance:ASServerName]
 [/AnalysisDatabaseName:DatabaseName]
 [/preview] [/continue] [/usesqlalwayson]

TF.exe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes
them from the disk.

tf destroy Destroys, or permanently deletes, version-controlled files from Team


Foundation version control.

tf label Attaches a label to or removes a label from a version of a file or folder in Team
Foundation version control.

tf labels Displays the list of labels in Team Foundation version control.

tf Stores a set of pending changes, together with pending check-in notes, a


shelve comment, and a list of associated work items in Team Foundation Server without
actually checking them into the version control server.

tf shelvesets Displays information about a set of shelved changes.

Tf Displays information about pending changes to items in one or more workspaces.


status

tf undelete Restores items that were previously deleted.

tf undo Removes pending changes from a workspace.

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


tf workspace Creates, deletes, displays, or modifies properties and mappings associated
with a workspace.

tf Displays information about workspaces in the system and updates cached


workspaces information about a user name or computer name change on Team
Foundation Server.

Caches Refresh
Work Item Caches Error:

1. On the New AT Server (only once)


2. http://MyTfs:8080/WorkItemTracking/v3.0/ClientService.asmx
3. Invoke StampWorkitemCache method

Version Control Cache

1. On every client computer in the organization


2. tf workspaces /collection: http://MyTFS:8080/tfs/CollectionName

Monitor & Performance

How to monitor warehouse adaptors & jobs

1. Can be done only from application tier server


2. WarehouseControlWebservice is central location for adaptors & jobs monitoring

http://localhost:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.as
mx

Individual Commands Performance

1. Tbl_Command & tbl_Parameter tables in each TPC database


2. Collects performance information for each information

Out of the box tool:

http://MyTFSserver:8080/tfs/_oi/

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Configure Team Build to use Proxy

1. Open Registry on build service (RegEdit).

2. Expand HKEY_CURRENT USER to


HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\TeamFoundati
on\SourceControl\Proxy.

3. In the details pane, set Enabled to True, and then set URL to
http://ProxyServer:Port.

4. On the File menu, click Exit to close Registry Editor.

Lab Environment

You can create and manage lab environments with the Lab Management features of
Microsoft Test Manager. A lab environment is a collection of virtual and physical machines,
which you can use to develop and test applications. A lab environment can contain multiple
roles needed to test multi-tiered applications, such as workstations, web servers, and
database servers. In addition, you can use a build-deploy-test workflow with your lab
environment to automate the process of building, deploying, and running automated tests
on your application.

Requirements
 Visual Studio Ultimate, Visual Studio Premium, Visual Studio Test Professional

Advantages of using lab environment:


1. Use a test plan to run automated tests − you can run a collection of automated
tests, called a test plan, and view the progress using Microsoft Test Manager.
2. Use a build-deploy-test workflow − you can use a build-deploy-test workflow to test
multi-tiered applications automatically. A typical example is a workflow that starts a
build, deploys the build files onto the appropriate machines in a lab environment, and
then performs automated tests. In addition, you can schedule your workflow to run at
specific intervals.
3. Collect diagnostic data from all machines, even during manual testing − you can
collect diagnostic data from multiple machines simultaneously. For example, during a
single test run, you can collect IntelliTrace, test impact, and other forms of data from
a web server, a database server, and a client.
4. Automatic test agent installation − Lab Management automatically installs test
agents on every machine in your environment.

If you use Lab Management in conjunction with System Center Virtual Machine
Manager (SCVMM), you can also get these benefits when you use lab
environments:
 Quickly reproduce machine configurations − you can store collections of virtual
machines that are configured to recreate typical production environments. You can
then perform each test run on a new copy of a stored environment.
 Reproduce the exact conditions of a bug – When a test run fails, you can store a
copy of the state of your lab environment, and access it from your build results or a
work item.
Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
 Run multiple copies of a lab environment at the same time – You can run multiple
copies of your lab environment at the same time without naming conflicts.

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment. The
following examples illustrate the kinds of changes you might make during the lifecycle
of an application.
 Change the name of an environment or its description after you have installed
new applications into it.
 Remove a virtual machine with an outdated OS and add another virtual machine
with a new OS to an existing stored environment.
 Change the environment capabilities in a stored environment so that all active
environments created from it will have those capabilities.

In Microsoft Test Manager, you can view and change active environments by choosing
the Lab tab. You can view and change stored environments by choosing the Library
tab.

Requirements
 Visual Studio Ultimate, Visual Studio Premium, Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1. Open Microsoft Test Manager and connect to the team project.


2. Open Lab Center.
3. Choose the Lab tab.
4. Choose the Environments sub-tab.
5. A list of environments is displayed.
6. Choose the environment that you want to view or change.
7. Choose Open, and then follow the steps in the wizard to view or change the
properties.
8. If you have opened the wizard just to view the properties of the SCVMM
environment, choose Cancel to close the wizard. If you have made changes and
want to save the changes, choose Finish.

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center, the status
might be in the Not Ready state and display the error message, “The environment has one
or more errors.”

This indicates that your environment is not ready to be used for manual or automated
testing or with build, deploy, and test workflows. This error might indicate one of the
following problems:

1. The installation or configuration of a test agent on one or more of the machines in


your environment failed.

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


2. There is a communication problem between one of the test agents in your
environment, and your test controller.
3. The test controller or the test agent process has shut down or is not functioning.
4. The user account of the test agent or the lab service account cannot be
authenticated by the test controller.

To address any of these problems, you need to repair your environment.

Requirements
 Visual Studio Ultimate, Visual Studio Premium, Visual Studio Test Professional

Repairing the environment


1. Choose your environment in the Environments list.
2. Choose Repair Environment from the shortcut menu of your environment.
3. The Status of your environment will change to Repairing.
4. If the repair is successful, the Status of the environment will change to Ready.

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state, disk data, and configuration
of all virtual machines in an environment at a specific point in time. After you take a
snapshot, you can continue to work in the environment, taking more snapshots as needed.
You can then restore the environment to a previous state. You can also create a link file to a
snapshot that enables other members of your team to connect to or re-create the snapshot.
You can also save a copy of the environment and its snapshots to the team project library.
When you save an environment to the team project library, both the environment and the
snapshots are saved in the team project library.

Requirements
 Visual Studio Ultimate, Visual Studio Premium, Visual Studio Test Professional

What you can do with environment snapshots:


 Creating Snapshots of an Environment
 Restoring an Environment From a Snapshot
 Sharing a Snapshot of an Environment
 Storing an Environment With Snapshots in the Library
 Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files, virtual machines, and templates that are
located on the library servers of the System Center Virtual Manager (SCVMM) for a team
project. Stored environments are one way to create deployed environments. A stored
environment cannot be started and run. When you deploy a stored environment, virtual

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


machines are created on the team project host groups from the templates and stored virtual
machines of the stored environment.

How to create and use stored environments in the following situations:

This topic describes how to create and use stored environments in the following situations:
Archiving deployed Store an environment for later use when you delete a
environments deployed environment.

Creating stored environments Create a stored environment from virtual machines or


from stored virtual machines templates in the project library.
and templates

Creating a stored network Store a network isolated environment to create exact


isolated environment duplicates of an environment that can run at the same
time.

Creating a stored environment Prepare the virtual machines in a deployed environment for
from a deployed environment re-use and then store the environment to create
functionally identical environments that do not use network
isolation. You can create stored environments of the
following types:
 Stored environments of templates
 Stored environments of virtual machines

Manage Security

If you don’t see the product backlog page or can’t send feedback requests, it might be
because you don’t have the right level of access to the features in Team Web Access. There
are three levels of access: standard, full or limited.

 Any user with a TFS client-access license (CAL) can have standard access.
 Full access is available to users who have one of these MSDN subscriptions: Visual
Studio Ultimate with MSDN, Visual Studio Premium with MSDN, or Visual Studio Test
Professional with MSDN. With full access, you get the more advanced agile project
management tools, and you can send feedback requests.
 You can give anyone limited access. There’s no license required. Limited access is
helpful when you want to use TFS to collaborate with your customers or stakeholders
(or anyone who’s not on your team, really).

Tip

For a team project upgraded with the RTM release of TFS 2012, you must enable new
features—such as the product backlog page and feedback requests—using the
Configure Features wizard.

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created,
but they don’t have access to any other pages.

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Project managers or other personnel who don't use Visual Studio can still support their
teams through Limited access. Limited access to TFS was designed to support members in
an organization with a TFS deployment who don't have a client access license (CAL). This
view restricts functionality so that your organization complies with the end-user license
agreement for Team Foundation Server.

Standard access
Standard access includes access to the team home page, work items, source and build
pages. You can manage your team on the team home page, view and manage source code,
changesets, and shelvesets on the Code page, view and manage builds on the Build page,
and plan and manage your work in various views.

Full access
With full access, you can plan and organize your work on the product backlog page .

Manage Reporting
By adding a report server to your TFS (on-premises) deployment, you can access a wealth
of data about your team's projects, such as build quality, bug trends, burndown, and test
progress. SQL Server Reporting Services (SSRS) reports provide insight to help teams
manage work and improve processes.
After you've added a report server, you'll want to add reports to your team project. You can
upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012.

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides.

1. From Team Explorer, download the latest process template that is compatible with
the one used to create your team project.
2. Upload the reports. The process template you specify must be compatible with the
one used to create the team project. And, it must have been uploaded to the team
project collection that hosts your team project.

tfpt addprojectreports
/collection:"http://MyServer:8080/tfs/DefaultCollection"
/teamproject:MyProject /processtemplate:"TemplateName"

Depending upon the amount of data that has been collected for your team project, it
can take several minutes to several hours for the data warehouse and cube to build.
Once they do, however, you can view progress for your team project since TFS was
first deployed.

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and
link to data for a team project. Once a SharePoint Web application has been configured for
use with a Team Foundation Server application-tier, SharePoint sites within the Web
application can begin to incorporate access to team project data.
A project portal can present data from a team project using any or all of the following
(depending on the capabilities of the environment):
Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
 Excel Web Access Web Parts that display Excel workbooks which are retrieving data
from the Server SQL Server Analysis Services database for Team Foundation Server,
 Team Web Access Web Parts that access data from the Team Foundation Server
operational data store,
 TfsRedirect application page that enables access to other team project resources
such as the associated SQL Server Reporting Services report folder, Team Web Access
site or process guidance.

Figure shows the flow of data from the Operational data stores, through the Data
Warehouse and into the Analysis Services cube. From there the data can be retrieved and
shown on the dashboards through a variety of methods.
Retrieval Method Source Dashboard Component

Team Foundation Team Foundation Server operational Team Web Access Web Parts
Server web services data

SharePoint Products Team Foundation Server data Excel Web Access Web Part
with Excel Services warehouse or SQL Server Analysis
Services cube

SQL Server Reporting Team Foundation Server data Page Viewer Web Parts or
Services warehouse or SQL Server Analysis Reporting Services Web Part
Services cube

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Rebuilding the Warehouse and Cube

Option #1:

 Manual approach
 Go to
http://localhost:8080/tfs/TeamFoundation/Administration/v3.0/Wareh
ouseControlService.asmx
 Process the warehouse:
o click ProcessWarehouse, and then click Invoke
 Process the cube:
o click ProcessAnalysisDatabase.
o in processingType, type either Incremental or Full, and then
click Invoke

Option #2:

 Using the TFS Administration Console


 Open the administration console for Team Foundation.
 Under Team Foundation, expand the name of the server, expand Application
Tier, and then click Reporting.
 Under Reporting, click Start Rebuild.
 The Take Offline dialog box opens.
 Click OK to take the data warehouse and Analysis Services cube offline.
 The Rebuild the Warehouse and Analysis Services Databases dialog box
opens.
 Click OK to initiate the rebuild process.

Option #3:

 Using the TfsConfig.exe RebuildWarehouse command


 Log in with an elevated command prompt
 Type TFSConfig RebuildWarehouse /analysisServices to only process the
cube
 Type TFSConfig RebuildWarehouse /all to process both the warehouse
and the cube
 Note: This command has NO option that will allow you to ONLY process the
warehouse, without the cube

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Customize Team Foundation Server for Team Use

Configure a team build definition

 Configure a team build definition.


 setting up for a symbol server and source server
 setting up for custom build numbers
 configuring build log verbosity
 setting up definition properties including test impact analysis, code analysis,
automated unit testing, and architecture validation
 setting up build triggers (gated check-in, continuous integration, scheduled
build)
 configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build.

You specify how completed builds are named by using an expression. Consider the following
example:
 The team project is named MyTFSProject.
 The build definition is named DailyBuild.
 The build ID is 1.
 Today is Feb 14, 2014.
 The time is 8:00:01 AM.
 The build has been run one time today.

You could set the BuildNumberFormat property to the following value:


$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)

Symbol Data

To prepare your SymStore symbol store


1. Set up a folder in which to store the symbols on a file-sharing server (for example,
\\MyTFSProject\symbols).
2. Grant Full Control permissions to the user account under which the build agent is
running.

To publish symbol data by using a Default Template build definition


1. In Team Explorer:
1. If you are not already connected to the team project that you want to work
in, then connect to the team project.
3. Choose Home, and then choose Builds.
2. Open the shortcut menu of a build, and then:
Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
1. Choose Edit Build Definition, and then in the build definition window choose
the Process tab.
2. Choose Queue New Build, and then on the Queue Build dialog box, choose the
Parameters tab.
3. Under the Basic node, expand the Source and Symbol Server Settings node.
4. Set Index Sources to True.
1. In Path to Publish Symbols, type the UNC file path to the folder (for example,
\\ MyTFSProject\symbols).

Configuring build log verbosity


In a build process that is based on the Default Template or the Upgrade Template, you can
use the Logging Verbosity build process parameter to manage the verbosity of the
information that is logged and stored.

Value Error Warni High- Normal- Low- Workflow


s ngs Importance Importance Importance Activity
Build Messages Messages Properties
Messages (inputs and
outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic Y Y Y Y On-premises Y
(Tip: In most build
cases you can controller: Y
instead use Hosted Build
diagnostic Controller: N
logs. See
Diagnose Build
Problems.)

Best Practice: Set Verbosity as Low as Possible


Although build information is important, a build process that logs too much information can
cause problems. These problems might include consuming too much storage on your Team
Foundation Server, decreasing Visual Studio performance, and overloading your team
members with more information than they can handle.

Use Minimal Verbosity When Running a Build


When you are running a build, you should generally follow the best practice of using the
lowest verbosity setting that still provides the information that you need to accomplish your
goal.

Run Tests in Your Build Process

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


You can use Team Foundation Build to run automated tests and analyze the impact of code
changes on your tests as part of your build process. For example, you can define a build
process to serve as your team’s regularly scheduled build verification test (BVT) run. You
can also run automated tests and perform test-related tasks from your custom build
processes.

You can perform one or more test runs in your build that is based on the Default Template.
For each run, you can specify the following settings:
 Which tests are run
 Which settings are used to run the tests
 Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template
1. On the menu bar, choose View, Team Explorer.
2. In Team Explorer, choose
Home, and then choose Builds.
3. On the Builds page, choose New Build Definition or open the shortcut menu for the
build or build definition you chose, and choose Edit Build Definition.
The build definition window appears.
4. On the Process tab of your build definition, expand the Basic node.
5. Select the Automated Tests check box, and then choose the ellipsis button (...).
The Automated Tests dialog box appears.
6. Perform one of the following steps:
o To add a set of tests, choose Add.
o To modify a set of tests, choose it, and then choose Edit.
The Add/Edit Test dialog box appears.
7. (Optional) Specify the Name of the test run. This name appears in the build results
window. If you do not specify a name, the system automatically generates it.
8. If you want the build to fail if any of the tests in this run fail, then choose Fail build
on test failure. If you leave this check box cleared and any test fails, the completed
build will be classified as Partially Succeeded.
9. Choose a test runner. Specify how the test runner will operate using the options that
appear

Build Triggers

You can manually queue a build whenever necessary, but your team’s needs will, in most
cases, be best met by build processes that are defined with automatic triggers. When a
build is triggered, a specific reason is recorded in the Reason property. This topic describes
and explains how to use all the available build triggers and build reasons when you develop
your build process.

 Use Build Triggers to Accomplish Team Goals


o Protect your team from build breaks
o Maintain quality by using continuous integration
o Check product quality by running nightly BVTs
 Use Automatic Build Triggers
o Use the Continuous Integration trigger to queue a build when a change is
checked in
o Use the Rolling builds trigger to queue a build when a change is checked in
but with limits on how often a build is run
Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
o Use the Gated Check-in trigger to queue a build when a team member
attempts to check in a change, and block the change if the build fails
o Use the Schedule trigger to queue a build on a regular interval
 Manually Queue a Build
o Queue a build
o Queue a private build
 Use Custom Code to Queue a Build
 Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition, you can specify a path to a drop folder so that
your build process can deliver binaries and log files to your team. Make sure the folder
you’ve identified is prepared for use as a drop folder.

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the
version control server.
To queue a public build at a command prompt, use the TFSBuild start command.

Queue a private build if you want to build changes that you have put into a shelveset. You
can use a private build (also known as a "buddy build") to validate changes to your code
before you check it in.
To queue a private build at a command prompt, use the TFSBuild start command with the
/shelveset option.

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each
build. For example, depending on the outcome of a set of manual tests, you could rate a
completed build's quality as Ready for Deployment, Rejected, or Under Investigation. By
rating the quality of completed builds, you enable team members to filter the Build Explorer
window to show only builds with specific quality ratings.
You can use the pre-defined build quality values, or you can use your own rating system by
creating custom quality values.

Required Permissions
To perform this procedure, your Edit build quality permission must be set to Allow. For more
information, see Team Foundation Server Permissions.

To rate the quality of a completed build in Build Explorer


1. In Team Explorer:
1. If you are not already connected to the team project that you want to work
in, then connect to the team project.
2. Choose Home, and then choose Builds.
3. On the Builds page, choose more, and then choose View My Builds.
The Build Explorer window opens.

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


2. In Build Explorer, on the Completed tab, open the shortcut menu for the build whose
quality you want to rate, and then choose Edit Build Quality.
A drop-down list appears in the Build Quality column.
3. From the drop-down list, choose the build quality value that you want to assign to
this build.
The chosen build quality is updated in Build Explorer.

To rate the quality of a completed build in the build results window


1. In the Build Explorer window, locate the build whose quality you want to rate, and
then double-click it, or open its shortcut menu and choose Open.
2. At the top of the build results window, choose the quality menu—the words <No
Quality Assigned> are displayed in it—and then choose a quality value.

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep.
You can modify two sets of retention policies in the Specify how builds should be retained
list and to meet your team's needs:
 The Triggered and Manual group of policies limit what the system keeps from those
builds that were queued either manually or by an automatic trigger.
 The Private group of policies limit what the system keeps from those builds that were
queued either manually from source code in a shelveset (as described in Queue a
Build).

To modify a retention policy for Stopped, Failed, Partially Succeeded, or Succeeded


completed builds, perform either or both of the following steps:
 Choose the value in the Retention Policy column, and choose one of the following
options: Keep All, Keep Latest Only, Keep 2 Latest, Keep 5 Latest, Keep 7 Latest, Keep
10 Latest, or Specify Count to Keep.
 Choose the value in the What to Delete column, and choose a value.

Process Template Customization

You will want to customize a process template to make sure that all team projects that
are created by using the template follow the business processes that your team or
organization uses. Also, you might want to customize a process template if you
upgrade Visual Studio Team Foundation Server from a previous release and you made
changes to an existing process template that you want to continue to use. You might
want to add these changes to a new process template or customize the old template to
add functionality that was provided in the current release.
To customize a process template, you first download an existing or blank process
template, modify or add files, upload the process template files, and then verify your
changes. The following illustration shows the sequence of the five main tasks that you
perform to customize a process template.

Customizing a process template is an iterative process. You will need a team project
collection that is defined on a server that is running Team Foundation Server where
you can test your process template to make sure that it was customized correctly.

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


1. Download the process template that you are either currently using or that most
closely matches what you will be using.
2. Rename the template (Important)
3. Make a few small changes at a time, verifying your changes as you go
4. Upload to a non-production server to test
5. Create a new team project using your template
6. Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual
Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server.
Specifically, you can define the initial configuration for the areas shown in the following
illustration by modifying the corresponding plug-in file for that functional area:

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team
Foundation Server 2012 (TFS) to manage your product lifecycle using work items, version
control, build definitions, and test plans and test cases suites. All clients require that you
connect to a server that runs TFS, and select a team project collection and a team project.
All clients require that you have the required permissions to access the team projects that
you select.

Visual Studio plug-ins and Team Foundation clients

The following clients, except for Team Web Access and Team Explorer Everywhere, are
installed when you install one of the editions of Visual Studio 2012. Team Web Access is
automatically installed and updated when TFS is installed or updated.

 Team Web Access provides a web interface to Team Foundation Server that grants
access to team projects, Agile planning and tracking tools, version control, and builds.

 Team Web Access - Work Item View Only (WIOV) provides users within an
organization without CAL to create, view, and modify only those work items that they
have created. This includes bugs, feedback responses, and other work item types.

 Team Explorer provides access to team projects, work item tracking, code reviews,
version control, and builds. It is installed with each version of Visual Studio 2012, or
you can install Team Explorer from the Microsoft download center as a standalone
client and on as many physical devices as you like.

 Team Explorer Everywhere. Your team can collaborate from Eclipse or from the
command line on the operating system of your choice and improve the predictability of
your development processes by using Team Explorer Everywhere. Team Explorer
Everywhere includes both the Team Foundation Server plug-in for Eclipse and the
Cross-platform Command-Line Client for Team Foundation Server.

 Microsoft Test Manager. You can use Test Manager to define your test effort and
create and run manual tests. Test Manager also integrates with the work item
Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
database in Team Foundation to create and track bugs that are found during test
efforts. Test Manager installs with Visual Studio Premium, Visual Studio Ultimate, or
Visual Studio Test Professional.

 Microsoft Feedback Client allows stakeholders to launch an application, capture


their interaction with it as video, and record verbal or type-written comments.
Feedback is stored in TFS to support traceability. Stakeholders can download the tool
for free. To connect to Team Foundation Server to record and save feedback,
stakeholders must have required permissions.

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products
when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012. The
add-in requires Office 2007 version or later.
To work online from one of these clients or to link a storyboard to a work item, you must
connect to TFS.

 Excel. With Excel, you can add or bulk edit work items to TFS to help manage your
project and stay synchronized with the work item database. In Excel, a Team
tab provides access to a set of features for connecting to a team project, importing
work items from a query, and publishing or refreshing a work item list.

 PowerPoint Storyboarding allows you to illustrate user stories and requirements


using PowerPoint. The Team Foundation add-in supports linking storyboard files to
Team Foundation Server. This add-in installs with one of the supported Visual Studio
2012 editions listed in the table below.

 Project. With Project, you can plan projects, schedule tasks, assign resources, and
track changes to manage TFS data. You have access to features that TFS doesn’t
support, such as a project calendar, Gantt charts, and resource views. In Project, a
Team menu appears and work items appear as tasks in a project plan.

 Project Professional. Team Foundation Server integrates with Project Server to


enable data to flow from work items in TFS to tasks in enterprise project plans in
Project Server. Project managers and software development teams can use the tools
that they prefer, work at the level of precision that supports their needs, and easily
share information. After the two server products are configured, the TFS
synchronization engine updates scheduling data and resource usage in both the
mapped enterprise project plan and team project.

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server, which caches
copies of version control files in the location of a distributed team. You may reduce
bandwidth requirements for remote developers by using a proxy server.

To perform this procedure, you must be a member of the Users security group on the
computer on which you are configuring Team Explorer.

To configure Team Explorer to use Team Foundation Server Proxy


Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
1. Launch Microsoft Visual Studio 2012.
2. On the Tools menu, choose Options.
The Options dialog box appears.
3. Expand Source Control, and then choose Visual Studio Team Foundation Server.
4. Select the Use proxy server for file downloads check box.
5. In the Proxy server name box, type the name of the computer that is hosting Team
Foundation Server Proxy.
6. In the Port box, type the port number for Team Foundation Server Proxy, and then
click OK.
Team Foundation Server Proxy typically listens for client requests on port 8081.

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Administer version control

Create and manage workspaces

Your workspace is a local copy of your team’s codebase. Your workspace enables you to
develop and test your code in isolation on your dev machine until you are ready to check in
your work.

To add, edit, or remove a workspace, choose Workspaces on the Workspace menu in Source
Control Explorer. The Manage Workspaces dialog box appears.

Choose Show remote workspaces if you want to view all the workspaces you own (including
those on other computers).

VC File/Folder Operations

Delete/Restore Files and Folders:

You can delete files and folders and also restore them, from both your dev machine and the
server

To delete an item

1. In either Solution Explorer or Source Control Explorer, browse to the folder or file
that you want to delete.
2. Select the items that you want to delete, open their shortcut menu, and choose
Delete.
3. When you are ready, check in your changes.

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change, in Solution Explorer, the Pending
Changes page, or Source Control Explorer, select the items, open their shortcut menu and
choose Undo or Undo Pending Changes.

If you or one of your teammates has checked in a delete change to the server, you can
restore the item as long as no one on your team has destroyed it.

To restore an item deleted from the server

1. From the menu bar choose Tools, Options.


2. On the Options dialog box, navigate to Source Control, Visual Studio Team
Foundation Server.
3. Select Show deleted items in the Source Control Explorer, and then choose OK.
4. From the menu bar choose View, Other Windows, Source Control Explorer.

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


5. In Source Control Explorer, navigate to the folder that contains the item you want to
restore.
6. Open the item’s shortcut menu and then choose Undelete.

When you use a local workspace, Visual Studio detects and enables you to resolve changes
you have made outside the system.

To use a local workspace to restore an item you deleted outside Visual Studio

1. In Team Explorer, choose


2. Home, and then choose Pending Changes.
3. In the Excluded Changes section, choose the Detected changes link.
4. In the Promote Candidate Changes dialog box, select an item for which delete
appears in the Change column, open its shortcut menu, and choose Restore this item.

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server
workspace, when you try to open the item in Visual Studio you may see an error message
such as: TF10187: Could not open document file name The system cannot find the file
specified.. You can restore the item by getting it from the server.

To use a server workspace to restore an item you deleted outside Visual Studio

1. In Source Control Explorer, browse to the folder that contains the deleted items.
2. Open the shortcut menu of the folder and choose Get Specific Version.
3. On the Get dialog box, select Overwrite all files even if the local version matches the
specified version.
Choose Get.

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out
settings. Check-out settings in Team Foundation version control enable files to be edited by
more than one person at the same time. The following procedure shows you how to
configure check-out settings.

Required Permissions
To configure check-out settings, you must have the Edit project-level information set to
Allow. For more information, see Team Foundation Server Permissions.

To configure checkout settings

1. In Team Explorer, select the team project for which you want to configure check-out
settings.
2. From the Team menu, click Team Project Settings, and then click Source Control.
Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
3. In the Source Control Settings dialog box, select the Check-out Settings tab.
4. Select or clear the Enable multiple checkout box.
5. Select or clear the Enable get latest on check-out box.
6. Click OK.

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when
you check it out. When this option is enabled, the check-out behavior is like Visual
SourceSafe. For more information about how the check-out settings work, see Team
Foundation Check-Out Settings.

Required Permissions

To configure check-out settings at the team project level, you must have the Manipulate
security settings permission set to Allow.

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project. If
you enable the get-latest-on-check-out option, this option is forced for all team members
who use the team project. They cannot override the setting. If you do not enable the get-
latest-on-check-out option, a team member can still enable it on his or her own computer.

To enable or disable get latest on check-out for a team project


1. From the Team menu, click Team Project Settings, and then click Source Control.
2. In the Source Control Settings dialog box, select the Check-out Settings tab.
3. Select or clear the Enable get latest on check-out box.
4. Click OK.

The following procedure controls the check-out behavior for your computer. This affects all
Team Foundation Server clients that are installed on your computer. This includes the tf.exe
command line utility and third-party client software.

To enable or disable get latest on check-out for your computer


1. From the Tools menu, click Options.
2. In the Options dialog box, expand Source Control and select Visual Studio Team
Foundation Server.
3. Select or clear the Get latest version of item on check out box.
4. Click OK.
5. Local Vs Server Workspace

When you create or edit a workspace, you can specify whether its location is Local or
Server. In most cases, local is best because it provides several advantages. Most notably,
you can perform core version control operations even when you're not connected to your
Team Foundation Server.

Understand: Why should I use a local workspace?


Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
There are a lot of things to love about a local workspace:

Work offline easily. You can quickly begin editing a file when your network connection is
unavailable or unreliable. From Solution Explorer you can add, edit, delete, rename, undo,
and compare items in your workspace even when you're not connected to your Team
Foundation Server.
Easily restore files that you have deleted locally. To restore locally deleted files, just
get your files.
Visual Studio automatically detects changes. When you add or delete files outside of
Visual Studio, the program automatically detects these changes.

Understand: When might I need to use a server workspace?

Even though a local workspace is a better option for most people, there are some special
cases when you might find a server workspace useful:

 Performance degrades as the number of items in a local workspace increases.


 A workspace that contains a very large number of files. Visual Studio keeps only one
copy of each file in a server workspace, which reduces the disk space required to store
them.
 You can use Visual Studio 2010 and earlier versions to work with the workspace.
 The Enable get latest on check-out option is available.

Some challenges you face if you use a server workspace:


Work offline with difficulty and with poor performance. When you are offline, you cannot
work with your local files because they are read-only until you check them out. You can
check out files only from Solution Explorer, and only after you switch to offline mode (as
explained below). While you're offline, you can't perform any other operations, such as add,
delete, rename, or undo.

The default setting for new Team Projects in TFS 2012 is “Local Workspace”

If you migrate from TFS 2010 or TFS 2008, all projects have Server Workspaces.

The most important things:


 Local workspace allow you to work offline easily
 Local workspace cannot have check out locks on files. You cannot claim a file
exclusively
 Migrated Team Projects have Server Workspaces
 The default workspace type is configurable at Team Project Collection Level
 Workspace types can be mixes. Some users have local some users have server
workspaces

Such an item depends on whether you are using a local or a server workspace. See Decide
Between Using a Local or a Server Workspace.

Unlock Other Users Checkout

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Discards one or more pending changes to files or folders.

tf undo [/workspace:workspacename[;workspaceowner]] [/recursive] itemspec [/noprompt]


[/login:username,[password]] [/collection:TeamProjectCollectionUrl]

Remove pending changes to a file

c:\code\SiteApp\Main\SolutionA\Project1>tf undo program.cs


Removes all pending changes to program.cs.

Recursively remove pending changes to all items in a folder

c:\code\SiteApp\Main>tf undo * /recursive


Removes all pending changes in the c:\code\SiteApp\Main folder and all its subfolders.

Remove pending changes to a file in a remote workspace

c:\>tf undo /collection:http://fabrikam-3:8080/tfs/DefaultCollection /workspace:FABRIKAM-


1;JuliaI $/SiteApp/Main/SolutionA/Project1/program.cs
Removes all pending changes to program.cs in the specified collection and workspace.

Deleting a Shelveset

Stores a set of pending changes, together with pending check-in notes, a comment, and a
list of associated work items on the server that is running Visual Studio Team Foundation
Server without actually checking them into the version control server.

tf shelve [/replace] [/comment:("comment"|@commentfile)] [shelvesetname]


[/validate][/noprompt] [/login:username,[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called
Reflector_BuddyTest, assigns ownership to the user Hans, then returns all items in the
current workspace to the latest version downloaded during the last get operation, and a
sets a read-only state.

c:\projects> tf shelve Reflector_BuddyTest;Hans /move


The following example deletes the existing shelveset, "new-feature" from the server,
creates a new shelveset by that name, and retains all pending changes in the current
workspace.

c:\projects> tf shelve new-feature /replace


The following example creates a shelveset named HelloWorld_TestMe that includes all
pending changes to all .cs files in the C:\projects working folder and its subfolders.

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


c:\projects> tf shelve HelloWorld_TestMe c:\projects\*.cs /recursive
The following example deletes the HelloWorld_24 shelveset.

c:\projects> tf shelve HelloWorld_24 /delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version
control through the Team Foundation Server Proxy. Team Foundation Server Proxy
manages a cache of downloaded version control files in the location of the distributed team.
By configuring the client to use 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.

Installing Proxy:

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxy.config
file on the server that is running Team Foundation Server Proxy. By default, this file is
located in the installation directory for Team Foundation Server Proxy.

You can use Proxy.config in the following ways:


 Determine the location of the cache root folder.
 Change the cache limit beyond which old files are removed from the cache.
 Change the amount of space to free when old files are removed.
 Change the interval for saving information about cache performance to a file.

After you perform one or more of these tasks, you must recycle the application pool by
using the IISRESET command to retrieve the most recent version of Proxy.config.

Required Permissions

To perform this procedure, you must be a member of the Administrators security group on
the server that is running Team Foundation Server Proxy.
Even if you are logged on with administrative credentials, you may have to take these
precautions on computers that are running Windows Server 2008 or Windows Vista:
 To follow a command-line procedure, you might have to open an elevated Command
Prompt. Click Start, right-click Command Prompt, and then click Run as Administrator.
 To modify Proxy.config, you might have to open a text editor as an administrator. To
open Notepad as an administrator, click Start, right-click Command Prompt, click Run
as administrator, and then type notepad. In Notepad, locate the Proxy.config file by
using the path in Configuration File.

To open the Proxy.config file

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


1. Click Start, point to All Programs, point to Microsoft Team Foundation Server 2010,
and then click Team Foundation Administration Console.
Team Foundation Administration Console appears.
2. Click Proxy Server, and then click the path in Configuration File.

To determine the specified cache root folder


1. Open Proxy.config in a text or XML editor.
2. Locate the <CacheRoot> element, which contains the location of the cache root
folder in the file system.
<CacheRoot>CacheRootFolderLocation</CacheRoot>

To change the limit at which old files are removed from the cache
1. Open Proxy.config in a text or XML editor.
2. Locate the <CacheLimitPolicy> element.
3. Perform one of the following tasks:
 To specify a percentage of available disk space to fill before old files are
removed from the cache, update the <PercentageBasedPolicy> element.
For example, the following line specifies that the cache should fill up to 60%
capacity of available disk space before old files are removed:
<PercentageBasedPolicy>60</PercentageBasedPolicy>
 To specify a fixed number of megabytes (MB) for the cache to reach before
old files are removed, add or update the <FixedSizeBasedPolicy> element.
For example, the following line specifies that the cache should reach 500 MB
before old files are removed.
<FixedSizeBasedPolicy>500</FixedSizeBasedPolicy>
4. Save and close the Proxy.config file.
5. Open a Command Prompt window, type iisreset, and then press ENTER.

To change the amount of cache to free when removing old files


1. Open Proxy.config in a text or XML editor.
2. Locate the <CacheDeletionPercent> element, and then update it by changing the
percentage of cache space to free when old files are removed.
For example, the following line specifies to free 50% of the cache when old files are
removed.
Copy
<CacheDeletionPercent>50</CacheDeletionPercent>
3. Save and close Proxy.config.
4. Open a Command Prompt window, type iisreset, and then press ENTER.

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is
named ProxyStatistics.xml. These statistics are tracked by performance counters that are
installed by default. The ProxyStatistics.xml file is located in the App_Data folder in the
installation directory for Team Foundation Server Proxy.
You can view these performance statistics from the Performance monitor or by using the
ProxyStatistics Web service. For more information, see How to: Examine Cache Performance
By Using Performance Monitor.

To change the interval for saving performance statistics to a file


1. Open Proxy.config in a text or XML editor.
Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
2. Locate the <StatisticsPersistTime> element, and then update it by changing the
number of hours for each interval.
Note

The default and minimum interval is one hour. The maximum interval is 24 hours.
For example, the following line specifies that the statistics should be saved every two
hours:
Copy
<StatisticsPersistTime>2</StatisticsPersistTime>
3. Save and close Proxy.config.
4. Open a Command Prompt window, type iisreset, and then press ENTER.

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server, you might want to examine
the performance of the version control cache on a computer that is running Team
Foundation Server or Team Foundation Server Proxy. By default, performance counters are
installed, and you can view their statistics by opening Performance Monitor or by using the
ProxyStatistics Web service. For information about how to use Performance Monitor to view
cache performance, see How to: Examine Cache Performance By Using Performance
Monitor.
For example, you can view statistics for the following counters:
 Current cache size
 Total cache hits
 Total download requests
 Total files in cache
These statistics are saved at set intervals to the ProxyStatistics.xml file. For information
about how to change the length of the intervals and other cache settings, see How to:
Change Cache Settings for Team Foundation Server Proxy.
Required Permissions
To perform this procedure, you must be a member of the Administrators security group on
the computer whose performance you want to monitor.
In addition to these permissions, you might need to address the following requirements on a
computer that is running Windows Server 2008 or Windows Vista:
 To follow a procedure that requires Internet Explorer, you might need to start it as
an administrator by clicking Start, clicking All Programs, right-clicking Internet
Explorer, and then clicking Run as administrator.
 To access Web sites or Web services, you might need to add one or more sites to the
list of trusted sites in Internet Explorer or start Internet Explorer as an administrator.
For more information, see the Microsoft Web site.

To view cache performance by using the ProxyStatistics Web service

1. Log on locally or open a Remote Desktop connection to the server whose


performance you want to monitor.
Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke
the QueryProxyStatistics operation.

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


2. Open Internet Explorer, and type one of the following URLs in the Address bar:
 For Team Foundation Server using the default settings for port and virtual
directory: http://localhost:8080/tfs/VersionControl/v1.0/proxystatistics.asmx
 For Team Foundation Server Proxy using the default settings for port:
http://localhost:8081/VersionControlProxy/v1.0/ProxyStatistics.asmx
The Web page for the ProxyStatistics Web service appears.
3. Click QueryProxyStatistics, and then click Invoke.
An XML output file opens that contains statistics about the cache performance. For
example, the output might resemble the following text:

<ProxyStatisticsInfo CurrentCacheSize="356352" NoOfRequests="82"


OverallCacheHits="41" NoOfFilesInCache="41" OverallCacheMisses="41"
CacheHitsPercentage="50" CacheMissPercentage="50" ..." />
Note

The following statistics are calculated at run time: OverallCacheMisses,


CacheHitsPercentage, and CacheMissPercentage

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/


Useful Resources

TFS Installation Guide: http://www.microsoft.com/en-


us/download/details.aspx?id=29035

Build Controller: http://msdn.microsoft.com/en-us/library/vstudio/dd793166.aspx

Build Agent: http://msdn.microsoft.com/en-us/library/vstudio/bb399135.aspx#props

Test Agent: http://msdn.microsoft.com/en-us/library/vstudio/dd648127.aspx

SCVMM: http://msdn.microsoft.com/en-us/library/vstudio/dd380687.aspx#SCVMM

Create Team Project: http://msdn.microsoft.com/en-us/library/vstudio/dd273726.aspx

Split TPC: http://msdn.microsoft.com/en-us/library/vstudio/dd936158.aspx

Create/Delete Snapshots: http://msdn.microsoft.com/en-


us/library/vstudio/ff427550.aspx

Security: http://msdn.microsoft.com/en-us/library/vstudio/jj159364.aspx

Tests in Your Build Process: http://msdn.microsoft.com/en-


us/library/vstudio/ms253138%28v=vs.110%29.aspx

Build Triggers: http://msdn.microsoft.com/en-


us/library/vstudio/hh190718%28v=vs.110%29.aspx

Step-by-Step Customization Process: http://msdn.microsoft.com/en-


us/library/vstudio/ms243882%28v=vs.110%29.aspx

Customize Functional Areas within a Process Template:


http://msdn.microsoft.com/en-us/library/vstudio/ms400734%28v=vs.110%29.aspx

Working with Team Foundation Clients: http://msdn.microsoft.com/en-


us/library/vstudio/ms181304%28v=vs.110%29.aspx

Query for bugs, Task: http://msdn.microsoft.com/en-


us/library/vstudio/dd286705(v=vs.110).aspx

Create Workspace: http://msdn.microsoft.com/en-us/library/cc138514(v=vs.110).aspx

Decide Between Using a Local or a Server Workspace:


http://msdn.microsoft.com/en-us/library/bb892960(v=vs.110).aspx
http://blogs.msdn.com/b/visualstudioalm/archive/2012/10/05/set-local-workspaces-as-
default-when-upgrading-to-tfs-2012.aspx
Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/
Administering Visual Studio TFS 2012 Jump Start (Online Training)

http://www.microsoftvirtualacademy.com/training-courses/administering-visual-studio-tfs-
2012-exam-496-jump-start

Book: http://www.amazon.com/Professional-Team-Foundation-Server-
2012/dp/1118314093

Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/

You might also like