Remove-AzTrafficManagerEndpointConfig
Removes an endpoint from a local Traffic Manager profile object.
Syntax
Remove-AzTrafficManagerEndpointConfig
-EndpointName <String>
-TrafficManagerProfile <TrafficManagerProfile>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Remove-AzTrafficManagerEndpointConfig cmdlet removes an endpoint from a local Azure Traffic Manager profile object. You can get a profile by using the Get-AzTrafficManagerProfile cmdlet.
This cmdlet operates on the local profile object. Commit your changes to the profile for Traffic Manager by using the Set-AzTrafficManagerProfile cmdlet. To remove an endpoint and commit changes in a single operation, use the Remove-AzTrafficManagerEndpoint cmdlet.
Examples
Example 1: Remove an endpoint
$TrafficManagerProfile = Get-AzTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11"
Remove-AzTrafficManagerEndpointConfig -EndpointName "contoso" -TrafficManagerProfile $TrafficManagerProfile
Set-AzTrafficManagerProfile -TrafficManagerProfile $TrafficManagerProfile
The first command gets an Azure Traffic Manager profile by using the Get-AzTrafficManagerProfile 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: | AzContext, 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-AzTrafficManagerProfile cmdlet.
Type: | TrafficManagerProfile |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |