I'm trying to create self-hosted windows private agents remotely on the VMs using ARM template & Deployment Group. I have created ARM template which will add the Team Services Agent as an extension successfully for the existing Windows VMs and could see that is getting added as an Target into Azure DevOps Deployment group and it is online as well, however i couldn't see that Agent under any Agent pools in Azure DevOps. Now i would need to associate that Agent to my build pipeline to execute the builds from that self-hosted agent?
PS NOTE: The reason i went with this approach is, Adding agent as custom script & agent installation using powershell or execute script using Run Command was not recommended by my client. Because basically these approaches required the main script to be stored in Storage account - so we can use SAS to call and execute them but using SAS itself was not recommended.
I have almost tried out all the ways of installing an agent remotely and in an automated-way. I should install the self-hosted windows Agent remotely and securely on the existing VM without logging in to VM and that agent should become an active agent so that I can associate that agent to my build pipelines.
Any suggestion will be helpful. Thanks.