Export (0) Print
Expand All

New-AzureTrafficManagerProfile

Updated: September 19, 2014

Applies To: Microsoft Azure

New-AzureTrafficManagerProfile

Creates a Traffic Manager profile.

Syntax

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




Detailed Description

The New-AzureTrafficManagerProfile cmdlet creates a Microsoft Azure Traffic Manager profile.

After you create a profile where you set the LoadBalancingMethod value to "Failover", you can determine the failover order of the endpoints you add to your profile with the Add-AzureTrafficManagerEndpoint cmdlet. For more information, see Example 2 below.

Parameters

-DomainName<String>

Specifies the domain name of the Traffic Manager profile. This must be a subdomain of trafficmanager.net.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LoadBalancingMethod<String>

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

-- Performance
-- Failover
-- RoundRobin


Aliases

none

Required?

true

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?

true

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?

true

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?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the Traffic Manager profile to create.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true(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 integers from 30 through 999,999.


Aliases

none

Required?

true

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: Create a Traffic Manager profile

This command creates a Traffic Manager profile named MyProfile in the specified Traffic Manager domain with a Round Robin load balancing method, a TTL of 30 seconds, HTTP monitoring protocol, monitoring port 80, and with the specified path.


PS C:\> New-AzureTrafficManagerProfile -Name "MyProfile" -DomainName "My.profile.trafficmanager.net" -LoadBalancingMethod "RoundRobin" -Ttl 30 -MonitorProtocol "Http" -MonitorPort 80 -MonitorRelativePath "/"

Example 2: 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