Running PowerShell script on VSTS deployment group
The deployment group agent must be running as Interactive mode. Article: Configure the agent
- Download agent (Agent queues admin page> Click Download agent)
- Run Command Line as administrator
- Run
.\config.cmd --machinegroup
command - Specify Server URL, PAT token, Project Name, Deployment Group Name, Agent name
- Press Enter (N) when it asks if you want to run the agent as a service
- Call
.\run.cmd
to start agent - 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}"