These blocks of Azure DevOps Pipeline YAML can be used to scan for all the active build agents on an Azure DevOps instance and trigger a build on each.
The setup of the permissions as to how to setup these pipeline is detailed in this post which is an updated version of this post