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.
Create an environmentSign in to your organization: https://dev.azure.com/{yourorganization} and select your project. Select Pipelines > Environments > Create environment. Enter information for the environment, and then select Create. Resources can be added to an existing environment later.
Within Azure Pipelines, what we wanted to do was create a deployment group, and then register the server we want to deploy to as a target within that deployment group. This will allow us to deploy directly to an on premise server.
To add a single demand to your YAML build pipeline, add the demands: line to the pool section. Or if you need to add multiple demands, add one per line. Checking for the existence of a capability (exists) and checking for a specific string in a capability (equals) are the only two supported operations for demands.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With