Remove work items from Azure DevOps
Remove work item from Azure DevOps or Team Foundation Server.
Remove-ADOWorkItem -Organization StartAutomating -Project PSDevOps -ID 10Remove-ADOWorkItem -Organization StartAutomating -Project PSDevOps -Query "Select [System.ID] from WorkItems Where [System.Title] = 'Test-WorkItem'" -PersonalAccessToken $pat -Confirm:$false -DestroyThe Organization
Type:
[String]
Required: true
Position: named
PipelineInput:true (ByPropertyName)
The Project
Type:
[String]
Required: true
Position: named
PipelineInput:true (ByPropertyName)
The Work Item ID
Type:
[String]
Required: true
Position: named
PipelineInput:true (ByPropertyName)
A query
Type:
[String]
Required: true
Position: named
PipelineInput:true (ByPropertyName)
If set, will return work item shared queries
Type:
[String]
Required: true
Position: named
PipelineInput:true (ByPropertyName)
The server. By default https://dev.azure.com/. To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs).
Type:
[Uri]
Required: false
Position: named
PipelineInput:true (ByPropertyName)
The api version. By default, 5.1. If targeting TFS, this will need to change to match your server version. See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops
Type:
[String]
Required: false
Position: named
PipelineInput:false
If set, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone.
Type:
[SwitchParameter]
Required: false
Position: named
PipelineInput:false
-WhatIf is an automatic variable that is created when a command has [CmdletBinding(SupportsShouldProcess)].
-WhatIf is used to see what would happen, or return operations without executing them
-Confirm is an automatic variable that is created when a command has [CmdletBinding(SupportsShouldProcess)].
-Confirm is used to -Confirm each operation.
If you pass -Confirm:$false you will not be prompted.
If the command sets a [ConfirmImpact("Medium")] which is lower than $confirmImpactPreference, you will not be prompted unless -Confirm is passed.
Remove-ADOWorkItem -Organization <String> -Project <String> -ID <String> [-Server <Uri>] [-ApiVersion <String>] [-Destroy] [-WhatIf] [-Confirm] [<CommonParameters>]Remove-ADOWorkItem -Organization <String> -Project <String> -Query <String> [-Server <Uri>] [-ApiVersion <String>] [-Destroy] [-WhatIf] [-Confirm] [<CommonParameters>]Remove-ADOWorkItem -Organization <String> -Project <String> -QueryID <String> [-Server <Uri>] [-ApiVersion <String>] [-Destroy] [-WhatIf] [-Confirm] [<CommonParameters>]