# Disabling Auto-Injection

**URL:** <https://community.dynatrace.com/t/disabling-auto-injection/36722>\
**Category:** Open Q&A\
**Tags:** installation, oneagent\
**Created:** [September 30, 2022, 6:41am UTC](https://community.dynatrace.com/t/disabling-auto-injection/36722 "2022-09-30T06:41:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jchrisw](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jchrisw](https://community.dynatrace.com/u/jchrisw)\
**Post date:** [September 30, 2022, 6:41am UTC](https://community.dynatrace.com/t/disabling-auto-injection/36722/1 "2022-09-30T06:41:23Z")

</div>

My Customer has to disable auto-injection for a set of hosts due to incompatibility with the agent and a particular piece of software on their host. They would like to do it via the command line during installation; however, doing that disables the ability to turn it back on later via the Dynatrace API and the Dynatrace UI. Is there a better way or strategy to be able to install the agent with auto-injection disabled and be able to turn it back on at a later time?

---

<div class="post-metadata">

**Author:** ![andre\_f](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andre_f/32/29172_2.png) [@andre\_f](https://community.dynatrace.com/u/andre_f)\
**Post date:** [September 30, 2022, 7:50am UTC](https://community.dynatrace.com/t/disabling-auto-injection/36722/2 "2022-09-30T07:50:10Z")

</div>

Hi&nbsp;[@jchrisw](https://community.dynatrace.com/user/54621)

Are you talking about installing the OneAgent in Infrastructure Only mode and you’re looking for a way to switch it to Full-Stack later?

Here we describe how to activate the Infra Only Mode: [Enable Infrastructure Monitoring mode](https://www.dynatrace.com/support/help/shortlink/infrastructure#enable-infrastructure-monitoring-mode). But of course you can also activate the Full-Stack Mode via the described ways, if Infra Only is active before.&nbsp;So it is also possible to change this via Settings API.
