Edit

Share via


Enable-AzTrafficManagerProfile

Enables a Traffic Manager profile.

Syntax

Fields

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

Object

Enable-AzTrafficManagerProfile
    -TrafficManagerProfile <TrafficManagerProfile>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

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

Enable-AzTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11"

This command enables the profile named ContosoProfile in ResourceGroup11.

Example 2: Enable a profile by using the pipeline

Get-AzTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11" | Enable-AzTrafficManagerProfile

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

Parameters

-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

-Name

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

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 enables 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 enable. 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

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