Edit

Share via


Remove-AzTrafficManagerProfile

Deletes a Traffic Manager profile.

Syntax

Fields

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

Object

Remove-AzTrafficManagerProfile
    -TrafficManagerProfile <TrafficManagerProfile>
    [-Force]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-AzTrafficManagerProfile 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

Remove-AzTrafficManagerProfile -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

Get-AzTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11" | Remove-AzTrafficManagerProfile -Force

This command gets the profile named ContosoProfile in ResourceGroup11. The command then passes that profile to the Remove-AzTrafficManagerProfile 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.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Fields
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Fields
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TrafficManagerProfile

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

Parameter properties

Type:TrafficManagerProfile
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Object
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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.

Inputs

TrafficManagerProfile

Outputs

Boolean