Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# constant parameters
$org = "MyAzureDevOpsOrgName"
$project = "MyAzureDevOpsProjectName"
$areaPath = "/the/area/path/containing/my/work/items"
$tag = "the-tag-that-identifies-work-items-as-automanaged"
$query = @"
FROM WorkItems
WHERE [Tags] CONTAINS '$tag'
AND [System.AreaPath] == '$areaPath'
List the automatically managed work items in Azure Boards
function Get-WorkItems {
az boards query `
--org "$org" `
--project $project `
--wiql ($query -replace "\s+", " ").Trim() `
| ConvertFrom-Json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment