Enable-AzureRmTrafficManagerProfile

Enables a Traffic Manager profile.

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

Enable-AzureRmTrafficManagerProfile
      -Name <String>
      -ResourceGroupName <String>
      [-DefaultProfile <IAzureContextContainer>]
      [<CommonParameters>]
Enable-AzureRmTrafficManagerProfile
      -TrafficManagerProfile <TrafficManagerProfile>
      [-DefaultProfile <IAzureContextContainer>]
      [<CommonParameters>]

Description

The Enable-AzureRmTrafficManagerProfile cmdlet enables an Azure Traffic Manager profile. You can specify the profile object by using the pipeline or as a parameter value. Alternatively, you can specify the profile by using the Name and ResourceGroupName parameters.

Examples

Example 1: Enable a profile specified by name

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

This command enables the profile named ContosoProfile in ResourceGroup11.

Example 2: Enable a profile by using the pipeline

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

This command gets the profile named ContosoProfile in ResourceGroup11. The command then passes that profile to the Enable-AzureRmTrafficManagerProfile cmdlet by using the pipeline operator. That cmdlet enables that profile.

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

-Name

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

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

-ResourceGroupName

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

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

-TrafficManagerProfile

Specifies a TrafficManagerProfile object to enable. 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.

Outputs

Boolean