Running PowerShell script on VSTS deployment group Running PowerShell script on VSTS deployment group powershell powershell

Running PowerShell script on VSTS deployment group


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.


--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}"