Remove-AzureTrafficManagerProfile

Remove-AzureTrafficManagerProfile

Deletes an Azure Traffic Manager profile.

Syntax

Parameter Set: Fields
Remove-AzureTrafficManagerProfile -Name <String> -ResourceGroupName <String> [-Force] [-Profile <AzureProfile> ] [ <CommonParameters>]

Parameter Set: Object
Remove-AzureTrafficManagerProfile -TrafficManagerProfile <TrafficManagerProfile> [-Force] [-Profile <AzureProfile> ] [ <CommonParameters>]

Detailed Description

The Remove-AzureTrafficManagerProfile cmdlet deletes an Azure Traffic Manager profile. You can specify a profile to delete by name, or you can specify a profile object. You can delete a profile object from Traffic Manager by using the pipeline or as a parameter value.

Parameters

-Force

Forces the command to run without asking for user confirmation.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Profile<AzureProfile>

Specifies an Azure profile.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ResourceGroupName<String>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TrafficManagerProfile<TrafficManagerProfile>

Specifies a TrafficManagerProfile object to delete.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.Azure.Commands.Network.TrafficManagerProfile

    You can pipe a TrafficManagerProfile object to this cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Boolean

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

Examples

Example 1: Delete a profile specified by name

This command deletes the profile named ContosoProfile in ResourceGroup11.

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

Example 2: Delete a profile by using the pipeline

This command gets the profile named ContosoProfile in ResourceGroup11, and then passes that profile to the current cmdlet by using the pipeline operator. The current command deletes that profile.

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

Get-AzureTrafficManagerProfile

New-AzureTrafficManagerProfile

Set-AzureTrafficManagerProfile