How to: List all Process Templates and respective Team Projects on Azure DevOps

This script list all Process Templates and respective Team Projects on Azure DevOps organization

An original script is available on my GitHub repository. See bellow this script:

Let’s go understand each used command.

  1. PowerShell script will receive the following parameters:
  • $PAT = Personal Access token to connect on Azure DevOps;
  • $Organization = Organization URL to list all processes and projects.

2. Processes List = use this command to list all process templates and respective team projects on the Azure DevOps organization.

$UriOrganization = "https://dev.azure.com/$($Organization)/" $uriProcess = $UriOrganization + "/_apis/work/processes?`$expand=projects"
$processesResult = Invoke-RestMethod -Uri $uriProcess -Method get -Headers $AzureDevOpsAuthenicationHeader
Foreach ($process in $processesResult.value)
{
Write-Host $process.name
}

3. After executing the script on PowerShell, will be generated a JSON file that lists all process templates and your respective team projects.

4. After creating JSON, I connected it on Power BI, as shown below:

--

--