Get-AzureTrafficManagerProfile

Gets the details of a Traffic Manager profile.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

Get-AzureTrafficManagerProfile
   [-Name <String>]
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

The Get-AzureTrafficManagerProfile cmdlet gets the details of a Microsoft Azure Traffic Manager profile. If you do not specify the Name parameter, the cmdlet lists the Traffic Manager profiles in the current subscription.

Examples

Example 1: Get the list of Traffic Manager profiles in a subscription

PS C:\>Get-AzureTrafficManagerProfile

This command gets the list of Traffic Manager profiles in your subscription.

Example 2: Get a Traffic Manager profile

PS C:\>Get-AzureTrafficManagerProfile -Name "MyProfile"

This command gets the Traffic Manager profile named MyProfile.

Example 3: Add an endpoint to a Traffic Manager profile

PS C:\>Get-AzureTrafficManagerProfile -Name "MyProfile" | Add-AzureTrafficManagerEndpoint -DomainName "Myapp2.cloudapp.net" -TrafficManagerProfile $MyTrafficManagerProfile -Type "CloudService" -Status "Enabled" | Set-AzureTrafficManagerProfile

This command adds an endpoint to a Traffic Manager profile, and then saves the profile.

Parameters

-Name

Specifies the name of the Traffic Manager profile to get.

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

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

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

Outputs

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

This cmdlet generates a Traffic Manager profile object or objects.