Skip to content

Commit ca16869

Browse files
committed
fix ado script
1 parent 06059ca commit ca16869

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ALZ/Public/Remove-AzureDevOpsAccelerator.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,11 +323,11 @@ function Remove-AzureDevOpsAccelerator {
323323
if($using:PlanMode) {
324324
Write-ToConsoleLog `
325325
"Would delete agent pool: $($pool.Name)", `
326-
"Would run: az pipelines pool delete --id $($pool.Id) --org $orgUrl --yes" `
326+
"Would run: az devops invoke --org $orgUrl --area distributedtask --resource pools --route-parameters poolId=$($pool.Id) --http-method DELETE --api-version 7.1" `
327327
-IsPlan -LogFilePath $TempLogFileForPlan
328328
} else {
329329
Write-ToConsoleLog "Deleting agent pool: $($pool.Name)"
330-
$result = az pipelines pool delete --id $pool.Id --org $orgUrl --yes 2>&1
330+
$result = az devops invoke --org $orgUrl --area distributedtask --resource pools --route-parameters poolId=$($pool.Id) --http-method DELETE --api-version 7.1 2>&1
331331
if($LASTEXITCODE -ne 0) {
332332
Write-ToConsoleLog "Failed to delete agent pool: $($pool.Name)", "Full error: $result" -IsWarning
333333
} else {

0 commit comments

Comments
 (0)