Remove-AzureRmTrafficManagerProfile

Deletes a Traffic Manager profile.

Important

Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.

To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.

Syntax

Remove-AzureRmTrafficManagerProfile
      -Name <String>
      -ResourceGroupName <String>
      [-Force]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzureRmTrafficManagerProfile
      -TrafficManagerProfile <TrafficManagerProfile>
      [-Force]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-AzureRmTrafficManagerProfile cmdlet deletes an Azure Traffic Manager profile. Specify the profile to delete by using the Name and ResourceGroupName parameters. Alternatively, you can specify a TrafficManagerProfile object using the TrafficManagerProfile parameter, or you can use the pipeline.

Examples

Example 1: Delete a profile specified by name

PS C:\>Remove-AzureRmTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11"

This command deletes the profile named ContosoProfile in ResourceGroup11. The command prompts you for confirmation.

Example 2: Delete a profile by using the pipeline

PS C:\>Get-AzureRmTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11" | Remove-AzureRmTrafficManagerProfile -Force

This command gets the profile named ContosoProfile in ResourceGroup11. The command then passes that profile to the Remove-AzureRmTrafficManagerProfile cmdlet by using the pipeline operator. That cmdlet deletes that profile. The command specifies the Force parameter. Therefore, it does not prompt you for confirmation.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

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

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

Forces the command to run without asking for user confirmation.

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

Specifies the name of the Traffic Manager profile that this cmdlet deletes.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of a resource group. This cmdlet deletes a Traffic Manager profile in the group that this parameter specifies.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TrafficManagerProfile

Specifies a TrafficManagerProfile object to delete. To obtain a TrafficManagerProfile object, use the Get-AzureRmTrafficManagerProfile cmdlet.

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

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.Commands.Network.TrafficManagerProfile

This cmdlet accepts a TrafficManagerProfile object.

Outputs

Boolean

This cmdlet returns a value of $True, if it succeeds or, if the deletion fails, a value of $False.