Removes an Azure DevOps service endpoint (service connection) from one or more projects.
Remove-AdoServiceEndpoint [[-CollectionUri] <string>] [-Id] <string> [-ProjectIds] <string[]>
[-Deep] [[-Version] <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
This cmdlet has the following aliases,
- N/A
This function removes a service endpoint (service connection) from one or more Azure DevOps projects. You can perform a deep deletion to also remove all associated pipeline resources.
$params = @{
CollectionUri = 'https://dev.azure.com/myorg'
Id = '00000000-0000-0000-0000-000000000001'
ProjectIds = 'MyProject'
}
Remove-AdoServiceEndpoint @paramsRemoves the service endpoint from the specified project.
$params = @{
Id = '00000000-0000-0000-0000-000000000001'
ProjectIds = @('Project1', 'Project2', 'Project3')
}
Remove-AdoServiceEndpoint @paramsRemoves the service endpoint from multiple projects.
Remove-AdoServiceEndpoint -Id '00000000-0000-0000-0000-000000000001' -ProjectIds 'MyProject' -DeepRemoves the service endpoint and all associated pipeline resources from the project.
Optional. The URI of the Azure DevOps collection or Azure DevOps Server. If not provided, it uses the default collection URI from $env:DefaultAdoCollectionUri.
Type: System.String
DefaultValue: $env:DefaultAdoCollectionUri
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Mandatory. The ID of the service endpoint to remove.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- EndpointId
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Mandatory. One or more project IDs from which to remove the service endpoint.
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Optional. If specified, performs a deep deletion to remove all associated pipeline resources.
Type: System.Management.Automation.SwitchParameter
DefaultValue: false
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Optional. The API version to use. Defaults to '7.1'.
Type: System.String
DefaultValue: 7.1
SupportsWildcards: false
Aliases:
- ApiVersion
- Api
ParameterSets:
- Name: (All)
Position: 3
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues:
- 7.1
- 7.2-preview.4
HelpMessage: ''This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- N/A
- None
- If the service endpoint is not found, a warning is displayed instead of throwing an error.
- The cmdlet has a high impact confirmation level, so it prompts for confirmation by default unless -Confirm:$false is specified.
- Multiple projects can be specified to remove the service endpoint from all of them in a single operation.
- Supports ShouldProcess for WhatIf and Confirm parameters (high impact).
- Requires authentication to Azure DevOps. Use
Set-AdoDefaultto configure default organization and project values. - The cmdlet automatically retrieves authentication through
Invoke-AdoRestMethodwhich callsNew-AdoAuthHeader.