Remove-AzureRmTrafficManagerEndpointConfig

Removes an endpoint from a local Traffic Manager profile object.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Remove-AzureRmTrafficManagerEndpointConfig
      -EndpointName <String>
      -TrafficManagerProfile <TrafficManagerProfile>
      [-DefaultProfile <IAzureContextContainer>]
      [<CommonParameters>]

Description

The Remove-AzureRmTrafficManagerEndpointConfig cmdlet removes an endpoint from a local Azure Traffic Manager profile object. You can get a profile by using the Get-AzureRmTrafficManagerProfile cmdlet.

This cmdlet operates on the local profile object. Commit your changes to the profile for Traffic Manager by using the Set-AzureRmTrafficManagerProfile cmdlet. To remove an endpoint and commit changes in a single operation, use the Remove-AzureRmTrafficManagerEndpoint cmdlet.

Examples

Example 1: Remove an endpoint

PS C:\>$TrafficManagerProfile = Get-AzureRmTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11"
PS C:\> Remove-AzureRmTrafficManagerEndpointConfig -EndpointName "contoso" -TrafficManagerProfile $TrafficManagerProfile 
PS C:\> Set-AzureRmTrafficManagerProfile -TrafficManagerProfile $TrafficManagerProfile

The first command gets an Azure Traffic Manager profile by using the Get-AzureRmTrafficManagerProfile cmdlet. The command stores the local profile in the $TrafficManagerProfile variable.

The second command removes an Azure endpoint named contoso from the profile stored in $TrafficManagerProfile. This command changes only the local object.

The final command updates the Traffic Manager profile named ContosoProfile to match the local value in $TrafficManagerProfile.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EndpointName

Specifies the name of the Traffic Manager endpoint that this cmdlet removes.

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

-TrafficManagerProfile

Specifies a local TrafficManagerProfile object. This cmdlet modifies this local object. To obtain a TrafficManagerProfile object, use the Get-AzureRmTrafficManagerProfile cmdlet.

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

Inputs

Microsoft.Azure.Commands.Network.TrafficManagerProfile

This cmdlet accepts a TrafficManagerProfile object to this cmdlet.

Outputs

Microsoft.Azure.Commands.Network.TrafficManagerProfile

This cmdlet returns a modified TrafficManagerProfile object.