O'Reilly logo

Hands-On Networking with Azure by Mohamed Waly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding an Azure endpoint using Azure PowerShell

To add an endpoint to an existing Traffic Manager profile, you need to first retrieve the profile and store it within a variable by running the following cmdlet:

$profile = Get-AzureRmTrafficManagerProfile -Name PacktProfile -ResourceGroupName PacktPub

Then, you need to retrieve the resource you want to distribute the traffic across. For example, a public IP address assigned to a Load Balancer. You can do so by running the following cmdlet:

$PIP = Get-AzureRmPublicIpAddress -Name "PIP" -ResourceGroupName PacktPub

Now, you can add the endpoint by running the following cmdlet:

Add-AzureRmTrafficManagerEndpointConfig -EndpointName LB1 -TrafficManagerProfile $profile -Type AzureEndpoints -TargetResourceId ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required