0

I have created a traffic manager profile to deploy in my test environment. It goes like this:

$TmProfile = New-AzTrafficManagerProfile -Name " " -ResourceGroupName " " -TrafficRoutingMethod Priority -RelativeDnsName " " -Ttl " " -MonitorProtocol TCP -MonitorPort " " -MonitorPath "/"

Add-AzTrafficManagerEndpointConfig -EndpointName VM-"" -TrafficManagerProfile $TmProfile -Type ExternalEndpoints -Target ""  -EndpointStatus Enabled -Priority 1
Add-AzTrafficManagerEndpointConfig -EndpointName VM-"" -TrafficManagerProfile $TmProfile -Type ExternalEndpoints -Target ""  -EndpointStatus Enabled -Priority 2
Set-AzTrafficManagerProfile -TrafficManagerProfile $TmProfile

Disable-AzTrafficManagerEndpoint -Name "VM- " -ProfileName $TmProfile -ResourceGroupName "" -Type ExternalEndpoints -Force

I used ps task in azure pipelines and the pipeline gets executed successfully. However, I am not able to deploy it to my azure environment. what task I need to use to publish it to azure. Also, "Publish Build Artifact" is not working since there is no artifact generated from this powershell script.

Please help me with the deployment part. Thanks:):)

Preben Huybrechts
  • 5,853
  • 2
  • 27
  • 63
LAKSHAY ARORA
  • 127
  • 1
  • 6
  • How about using [azure powershell](https://i.stack.imgur.com/6c7RN.png) task? Using this task to run a powershell script within an azure environment. – Hugh Lin Jul 16 '20 at 09:32
  • Not get your latest information, is the workaround helpful for you? Or if you have any concern, feel free to share it here. – Hugh Lin Jul 21 '20 at 09:08
  • Thanks for your response. I am using Azure PowerShell task. However, unable to deploy it. What other tasks and setup I need to deploy my TM to azure. – LAKSHAY ARORA Jul 27 '20 at 10:06

1 Answers1

0

You can try to use azure powershell task . Using this task to run a powershell script within an azure environment.

enter image description here

Here is the document for reference.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
  • Thanks for your response Yes I am using Azure PowerShell task. However, I am not able to deploy it. What tasks and setup I need to deploy TM to azure. – LAKSHAY ARORA Jul 27 '20 at 10:05