Created
May 5, 2020 01:48
-
-
Save vinijmoura/d7c6c10f0fb1b9d0d66dd0ab40717d01 to your computer and use it in GitHub Desktop.
Create Iteration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param | |
| ( | |
| [string]$PAT, | |
| [string]$Organization, | |
| [string]$Project, | |
| [string]$TeamName, | |
| [DateTime]$StartDate, | |
| [int]$NumberOfSprints | |
| ) | |
| echo $PAT | az devops login --org $Organization | |
| Write-Host '===Configuring connection to organization and Team Project' | |
| az devops configure --defaults organization=$Organization project=$Project | |
| For ($i=1; $i -le $NumberOfSprints; $i++) | |
| { | |
| $Sprint = 'Sprint ' + $i | |
| $StartDateIteration = $StartDate.AddDays(($i - 1) * 14) | |
| $FinishDateIteration = $StartDateIteration.AddDays(11) | |
| $createIteration = az boards iteration project create --name $Sprint --start-date $StartDateIteration --finish-date $FinishDateIteration --org $Organization --project $Project | ConvertFrom-Json | |
| $addIteration = az boards iteration team add --id $createIteration.Identifier --team $TeamName --org $Organization --project $Project | ConvertFrom-Json | |
| Write-Host $addIteration.name 'created on path'$addIteration.path | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment