Export (0) Print
Expand All

Set-AzureTrafficManagerProfile

Updated: May 29, 2014

Set-AzureTrafficManagerProfile

Updates the properties of a Traffic Manager profile.

Syntax

Parameter Set: Default
Set-AzureTrafficManagerProfile [-TrafficManagerProfile] <IProfileWithDefinition> [-LoadBalancingMethod <String> {Performance | Failover | RoundRobin} ] [-MonitorPort <Int32> ] [-MonitorProtocol <String> {Http | Https} ] [-MonitorRelativePath <String> ] [-Name <String> ] [-Ttl <Int32> ] [ <CommonParameters>]




Detailed Description

The Set-AzureTrafficManagerProfile cmdlet updates the properties of a Microsoft Azure Traffic Manager profile.

For profiles for which you have set the LoadBalancingMethod value to "Failover", you can determine the failover order of the endpoints you have added to your profile with the Add-AzureTrafficManagerEndpoint cmdlet. For more information, see Example 3 below.

Parameters

-LoadBalancingMethod<String>

Specifies the load balancing method to use to distribute the connection. Valid values are:

-- Performance
-- Failover
-- RoundRobin


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MonitorPort<Int32>

Specifies the port used to monitor endpoint health. Valid values are integer values greater than 0 and less than or equal to 65,535.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MonitorProtocol<String>

Specifies the protocol to use to monitor endpoint health. Valid values are:

-- Http
-- Https


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MonitorRelativePath<String>

Specifies the path relative to the endpoint domain name to probe for health state. The path must meet the following restrictions:

-- The path must be from 1 through 1000 characters.
-- It must start with a forward slash, /.
-- It must contain no XML elements, <>.
-- It must contain no double slashes, //.
-- It must contain no invalid HTML escape characters. For example, %XY.


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 to update.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-TrafficManagerProfile<IProfileWithDefinition>

Specifies the Traffic Manager profile object you use to set the profile.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true(ByValue,ByPropertyName)

Accept Wildcard Characters?

false

-Ttl<Int32>

Specifies the DNS Time-to-Live (TTL) that informs the Local DNS resolvers how long to cache DNS entries. Valid values are an integer from 30 through 999,999.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

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

Inputs

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

Outputs

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

  • Microsoft.WindowsAzure.Commands.Utilities.TrafficManager.Models.IProfileWithDefinition

    This cmdlet generates a Traffic Manager profile object.


Examples

Example 1: Set the TTL for a Traffic Manager profile

This command sets the TTL to 60 seconds for the Traffic Manager profile object MyTrafficManagerProfile.


PS C:\> Set-AzureTrafficManagerProfile -TrafficManagerProfile $MyTrafficManagerProfile -Ttl 60

Example 2: Set several values for a profile

This command gets a Traffic Manager profile named MyProfile by using the Get-AzureTrafficManagerProfile cmdlet. The profile uses the RoundRobin load balancing method, a TTL of 30 seconds, the monitor protocol HTTP, the monitor port, and the relative path for a Traffic Manager profile.


PS C:\> Get-AzureTrafficManagerProfile -Name "MyProfile" | Set-AzureTrafficManagerProfile -LoadBalancingMethod "RoundRobin" -Ttl 30 -MonitorProtocol "Http" -MonitorPort 80 -MonitorRelativePath "/" 

Example 3: Reorder endpoints to desired failover order

This example reorders the endpoints added to MyProfile to the desired failover order.

The first command gets the Traffic Manager profile object named MyProfile and stores the object in the $Profile variable.

The second command re-orders the endpoints from the endpoints array to the order in which failover should occur.

The last command updates the Traffic Manager profile stored in $Profile with the new endpoint order.


PS C:\> $Profile = Get-AzureTrafficManagerProfile -Name "MyProfile"
PS C:\> $Profile.Endpoints[0],$Profile.Endpoints[1] = $Profile.Endpoints[1],$Profile.Endpoints[0]
PS C:\> $Profile = Set-AzureTrafficManagerProfile

Related topics

Show:
© 2014 Microsoft