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

Creating a Web3 Charity Application

Pascal notation and multiword domain names

WWDC Highlights Part 3 — Not Banana App Using Core ML

Overcoming Labor Shortages Through Automation and Outsourced Services: Part One

What happens when you type a URL in your browser and press Enter

Amazon Aurora and Local Storage

Amazon Aurora RDS Metrics.

SpringFest One Fashion Show at the University of Michigan https://t.co/LLKqXRa9Er

Python3: Object-based language

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

How to get started with Azure Lighthouse

⚡Azure Expert MSP Audit Checklist: Access Management & Azure AD SSO

Devops AZURE Scrum Process

On-Premises Disaster Site Recovery Strategy with Azure VM