How to: Viewing individual capacities on different projects, teams, and sprints in Azure DevOps

  1. PowerShell script will receive the following parameters:
  • $PAT = Personal Access token to connect on Azure DevOps;
  • $Organization = Organization URL used on REST API;
$uriProject = $UriOrganization + "_apis/projects/"
$ProjectsResult = Invoke-RestMethod -Uri $uriProject -Method get -Headers $AzureDevOpsAuthenicationHeader
Foreach ($project in $ProjectsResult.value)
{
Write-Host $project.name
}
$uriTeams = $UriOrganization + "_apis/projects/$($project.id)/teams"    $TeamsResult = Invoke-RestMethod -Uri $uriTeams -Method get -Headers $AzureDevOpsAuthenicationHeader    
Foreach ($team in $TeamsResult.value)
{
Write-Host $team.name
}
$uriSprintsTeam = $UriOrganization + "$($project.id)/$($team.id)/_apis/work/teamsettings/iterations"        $SprintsTeamResult = Invoke-RestMethod -Uri $uriSprintsTeam -Method get -Headers $AzureDevOpsAuthenicationHeader        
Foreach ($sprintteam in $SprintsTeamResult.value)
{
Write-Host $sprintteam.attributes.startDate
Write-Host $sprintteam.attributes.finishDate
}
$uriCapacities = $UriOrganization + "$($project.id)/$($team.id)/_apis/work/teamsettings/iterations/$($sprintteam.id)/capacities"                
$CapacitiesResult = Invoke-RestMethod -Uri $uriCapacities -Method get -Headers $AzureDevOpsAuthenicationHeader
Foreach ($capacity in $CapacitiesResult.value)
{
Write-Host $capacity.teamMember.displayName
}
{
"UserName": "Vinicius Moura",
"UserNameHour": 5.0,
"SprintStartDate": "2020-10-19",
"SprintName": "Sprint 2",
"SprintFinishDate": "2020-10-30",
"ProjectName": "Capacity",
"TeamName": "Team B",
"UserNameActivity": "Documentation"
}
  1. Azure DevOps capacities:

--

--

--

Tech Solution Architect Manager na Accenture

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Code for San Jose 2021 Wrap

An Introduction to High-throughput computing (HTC)

Flutter Stack Weekly — Issue #12

Flutter Stack Weekly — Issue #12

How to Scale a Windows 7 App to the Cloud and Add AI

Spring Security: Develop a REST-Service Secured With OAuth2, Bitbucket and JWT

Flutter Bloc Architecture

What I learned from working on a toxic work environment as a developer

Guide to programming languages

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vinicius Moura

Vinicius Moura

Tech Solution Architect Manager na Accenture

More from Medium

💪Create a Face cognitive service using Azure Bicep Language

Azure DevOps to Jira migration

Removing orphan records from Azure App Configuration Service when importing the data

How to: List GitHub default Branch protection rules