Last active
January 28, 2020 10:03
-
-
Save stusklinar/4c97627826c46c155f90204b2b4cb290 to your computer and use it in GitHub Desktop.
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
$collectionurl = "https://azure-devops-url" | |
$collectionName= "DefaultCollection" | |
$projectName= "Development" | |
$baseUrl = "${collectionurl}/$collectionName/$projectName/_apis/build" | |
$buildDefsReq = (Invoke-RestMethod -Uri $baseUrl/Definitions/ -Method Get -UseDefaultCredential) | |
foreach($def in $buildDefsReq.value){ | |
$buildDef = (Invoke-RestMethod -Uri $baseUrl/Definitions/$($def.id) -Method Get -UseDefaultCredential) | |
if($buildDef.repository.type -notlike "TfsGit"){ | |
write-host $buildDef.name | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment