I have existing team project ( TFS 2018 )I want to know which process template have been used.
Asked
Active
Viewed 938 times
0
-
Possible duplicate of [How to determine used process template in Team Foundation Server after creation of team project](https://stackoverflow.com/questions/909223/how-to-determine-used-process-template-in-team-foundation-server-after-creation) – Yan Sklyarenko Sep 17 '18 at 06:54
2 Answers
1
List the projects via REST API and get the
{projectId}
for a specific project:GET http://SERVER:8080/tfs/DefaultCollection/_apis/projects
Retrieve the Process template information from project properties by calling REST API:
GET http://SERVER:8080/tfs/DefaultCollection/_apis/projects/{projectId}/properties
Please see Projects - Get Project Properties for details.
Well, you can simply use below Powershell script to get which process template have been used for a specific team project:
Param(
[string]$collectionurl = "http://server:8080/tfs/DefaultCollection",
[string]$projectname = "GXJGitTest",
[string]$user = "domain\user",
[string]$token = "password/PAT"
)
# Base64-encodes the Personal Access Token (PAT) appropriately
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user,$token)))
#Get project ID
$ProjectsUrl = "$collectionurl/_apis/projects"
$ProjectsResponse = Invoke-RestMethod -Uri $ProjectsUrl -Method Get -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)}
$projectid = ($ProjectsResponse.value | where {$_.name -eq $projectname}).id
#Get system.template
$PTurl = "$collectionurl/_apis/projects/$projectid/properties"
$response = Invoke-RestMethod -Uri $PTurl -Method Get -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)}
$ProcressTemplate = ($response.value | where {$_.name -eq 'System.Process Template'}).value
Clear-host
Write-Host "The project $projectname is using the $ProcressTemplate Process Template."

Andy Li-MSFT
- 28,712
- 2
- 33
- 55
0
If you use 1 from 3 built-in templates (Agile, Scrum, CMMI) you can check which work item type you have:
- Agile - User story
- Scrum - Product Backlog Item
- CMMI - Requirement
If you use a custom template you can check the process template with rest API:
Get http://yourServer:8080/tfs/DefaultCollection/_apis/projects/TestTemplate?includeCapabilities=true&api-version=1.0
You could get the result about the template like the following:
"capabilities": {
"processTemplate": {
"templateName": "Test"
},

Shayki Abramczyk
- 36,824
- 16
- 89
- 114