Search code examples
azure-devopsazure-pipelinesenvironment

Add environment to Pipeline stuck in "connecting to server"


I'm trying to add a resource to the environment tab in the Pipeline of azure Devops, but the Powershell is stuck in "connecting to the server". Am i missing something?

The powershell is generated by AzureDevOps when i click in "Add Resource" and the resource is a windows virtual machine.

enter image description here


Solution

  • This kind of issue may occur when using PowerShell ISE...

    Please ran the same in a regular PS elevated prompt and check if it works.

    Also make sure you have run the copied script from an administrator PowerShell command prompt on each of the target VMs that you want to register with this environment.

    More detail steps, kindly follow our official tutorial here-- Virtual machine resource creation