Solution:
Powershell:
Authenticate to Azure Portal:
Login-AzureRmAccount
Set the tenant, subscription & environment for cmdlets to use in the current session:
Set-AzureRmContext -SubscriptionName "InsertSubscriptionNameHere" #Get-AzureRmSubscription -SubscriptionName "InsertSubscriptionNameHere" #Select-AzureRmSubscription -SubscriptionName "InsertSubscriptionNameHere"
View Get-AzureRmTrafficManagerProfile:
Get-AzureRmTrafficManagerProfile -ResourceGroupName InsertResourceGroupNameHere -Name InsertTrafficManagerProfileNameHere
Store Traffic Manager Profile in a variable: $profiles = Get-AzureRmTrafficManagerProfile -ResourceGroupName InsertResourceGroupNameHere -Name InsertTrafficManagerProfileNameHere
View Traffic Manager Endpoints status:
$profiles.Endpoints | Format-Table
$profiles.Endpoints[0].EndpointStatus
$profiles.Endpoints[1].EndpointStatus
To Disable an EndPoint:
$profiles.Endpoints[0].EndpointStatus = "Disabled"
Set-AzureRMTrafficManagerProfile –TrafficManagerProfile $profiles
To Enable an EndPoint:
$profiles.Endpoints[0].EndpointStatus = "Enabled"
Set-AzureRMTrafficManagerProfile –TrafficManagerProfile $profiles
Resources:
Microsoft Azure
Azure Traffic Manager Cmdlets
Azure Traffic Manager External Endpoints and Weighted Round Robin via PowerShell
|
|
|
|
|