Remove-AzureTrafficManagerEndpoint

Removes an endpoint from a Traffic Manager profile.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Service Management APIs. See the Az PowerShell module for cmdlets to manage Azure Resource Manager resources.

Syntax

Remove-AzureTrafficManagerEndpoint
      -DomainName <String>
      [-Force]
      -TrafficManagerProfile <IProfileWithDefinition>
      [-Profile <AzureSMProfile>]
      [<CommonParameters>]

Description

The Remove-AzureTrafficManagerEndpoint cmdlet removes an endpoint from a Microsoft Azure Traffic Manager profile. After you remove an endpoint, pass the result to the Set-AzureTrafficManagerProfile cmdlet by using the pipeline operator. That cmdlet connects to Azure to save your changes.

Examples

Example 1: Remove an endpoint from a profile

PS C:\>$TrafficManagerProfile = Get-AzureTrafficManagerProfile -Name "ContosoProfile"
PS C:\> Remove-AzureTrafficManagerEndpoint -TrafficManagerProfile $TrafficManagerProfile -DomainName "Contoso02App.cloudapp.net" | Set-AzureTrafficManagerProfile

The first command uses the Get-AzureTrafficManagerProfile cmdlet to get the profile named ContosoProfile, and then stores it in the $TrafficManagerProfile variable.

The second command removes an endpoint that has the domain name Contoso02App.cloudapp.net from the Traffic Manager profile that is stored in $TrafficManagerProfile. The command passes the profile object to the Set-AzureTrafficManagerProfile cmdlet to connect to Azure to save your changes.

Parameters

-DomainName

Specifies the domain name of the endpoint to remove.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Force

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TrafficManagerProfile

Specifies the Traffic Manager profile object from which to remove the endpoint.

Type:IProfileWithDefinition
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Outputs

Microsoft.WindowsAzure.Commands.Utilities.TrafficManager.Models.IProfileWithDefinition

This cmdlet generates a Traffic Manager profile object, which contains information about the updated profile.