Currently, the best approach would probably be to use oneagentctl (see OneAgent configuration via command-line interface — Dynatrace Docs).
Currently, the best approach would probably be to use oneagentctl (see OneAgent configuration via command-line interface — Dynatrace Docs).