# Move one Agent from One Environment to Another -urgent

**URL:** <https://community.dynatrace.com/t/move-one-agent-from-one-environment-to-another-urgent/21817>\
**Category:** Open Q&A\
**Tags:** installation, oneagent\
**Created:** [September 5, 2019, 5:08pm UTC](https://community.dynatrace.com/t/move-one-agent-from-one-environment-to-another-urgent/21817 "2019-09-05T17:08:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramakrishnan\_p](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@ramakrishnan\_p](https://community.dynatrace.com/u/ramakrishnan_p)\
**Post date:** [September 5, 2019, 5:08pm UTC](https://community.dynatrace.com/t/move-one-agent-from-one-environment-to-another-urgent/21817/1 "2019-09-05T17:08:58Z")

</div>

Hello

we have 2 environments in place QA and PROD in Dynatrace Managed. we are using the QA very limited purpose only. if there is a requirement to perform monitoring in QA , Can we switch the one Agent(s) from PROD to QA? if it is Possible, How fast we can do?

any documentation or screenshot available, please share the same.

Thanks

RamP

---

<div class="post-metadata">

**Author:** ![Joe\_Hoffman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/joe_hoffman/32/30752_2.png) [@Joe\_Hoffman](https://community.dynatrace.com/u/Joe_Hoffman)\
**Post date:** [September 5, 2019, 5:16pm UTC](https://community.dynatrace.com/t/move-one-agent-from-one-environment-to-another-urgent/21817/2 "2019-09-05T17:16:35Z")

</div>

RamP,

We’ll need a bit more clarification to answer your question. I envision two use cases, please clarify which use case fits your situation.

1) HostA currently has OneAgent installed and is configured to report to Dynatrace Environment1. You want to know how to have HostA data report to Dynatrace Environment2.

2) You have two hosts, HostA, HostB. You currently have OneAgent on HostA. You want to move this OneAgent to HostB.

Thanks for clarifying your situation.

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [September 5, 2019, 5:16pm UTC](https://community.dynatrace.com/t/move-one-agent-from-one-environment-to-another-urgent/21817/3 "2019-09-05T17:16:54Z")

</div>

Do you mean license wise or a OneAgent installed on a server?

---

<div class="post-metadata">

**Author:** ![Radoslaw\_Szulgo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radoslaw_szulgo/32/1977_2.png) [@Radoslaw\_Szulgo](https://community.dynatrace.com/u/Radoslaw_Szulgo)\
**Post date:** [September 5, 2019, 6:50pm UTC](https://community.dynatrace.com/t/move-one-agent-from-one-environment-to-another-urgent/21817/4 "2019-09-05T18:50:50Z")

</div>

You need to update environment identifier and token in OneAgent configuration file and restart OneAgent.

---

<div class="post-metadata">

**Author:** ![AlexLarrieu](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@AlexLarrieu](https://community.dynatrace.com/u/AlexLarrieu)\
**Post date:** [June 24, 2021, 2:46pm UTC](https://community.dynatrace.com/t/move-one-agent-from-one-environment-to-another-urgent/21817/5 "2021-06-24T14:46:28Z")

</div>

Hello,

I have unterstood how to move the&nbsp;environment identifier. But how do I know the new token?

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [June 24, 2021, 3:28pm UTC](https://community.dynatrace.com/t/move-one-agent-from-one-environment-to-another-urgent/21817/6 "2021-06-24T15:28:55Z")

</div>

[@AlexLarrieu](https://community.dynatrace.com/user/23994)&nbsp;please use the [oneagentctl](https://www.dynatrace.com/support/help/setup-and-configuration/dynatrace-oneagent/oneagent-configuration-via-command-line-interface/) command on the node to get and set the server , environment and token parameters.
