4
votes

I am configuring a deployment group phase inside my release definition at VSTS.

I added a PowerShell script task that is supposed to start a process (.exe console app) on the target machine.

I have tested the PowerShell script manually on the target PC and it is working great:

start-process -filepath c:\myfolder\myprogram.exe

But when the release runs, the script seems not to be working. It executes properly but my process is not initiated.

There is no error message on the release log.

How can I fix that?

2
what does the script look like? - ArcSet
To remove the previous agent, you can run config.cmd remove command. (1. Open Command Prompt as administrator 2. Go to agent folder, such as cd C:\vstsagent\A1 3. call .\config.cmd remove) - starian chen-MSFT

2 Answers

5
votes

The deployment group agent must be running as Interactive mode. Article: Configure the agent

  1. Download agent (Agent queues admin page> Click Download agent)
  2. Run Command Line as administrator
  3. Run .\config.cmd --machinegroup command
  4. Specify Server URL, PAT token, Project Name, Deployment Group Name, Agent name
  5. Press Enter (N) when it asks if you want to run the agent as a service
  6. Call .\run.cmd to start agent
  7. Modify release definition, specify that deployment group for Run on deployment group.
1
votes

--machinegroup no longer support in the Agent installation,

So go with below,

  .\config.cmd --deploymentgroup --deploymentgroupname "{Deployment Group Name}" --agent $env:COMPUTERNAME --runasservice --work "{Working Folder}" --url "{VSTS/Azure DevOps URL}" --projectname "{Project Name}" --auth PAT --token "{Token generated from azure DevOps portal with relevant release permissions}"