Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Why does Powershell show agent log lines?



On any system with the .NET Agent installed, open PowerShell and you'll see the following:

2015-10-25 08:46:04 [000002a4] info [native] Loading collector peer list from C:/Program Files/dynaTrace/dynaTrace 6.
2015-10-25 08:46:04 [000002a4] info [native] Agent has no active settings - running normally
Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.

This caused some concern from a customer I was at recently. I'm sure it's benign, but I like to be able to explain things 🙂

Can we explain this or change the behavior?


Rick B


Dynatrace Leader
Dynatrace Leader

To inject our .net agent, we register at the system level as a debugger, so our agent gets invoked for every process that loads the .NET runtime libraries. However once the include list is checked and the process is not found to be on the include list, then the agent quits further activity and the process continues running without the dynatrace Agent activity. So in the case of PowerShell, this tells us that Powershell is loading the .NET Runtime libraries.

This is benign and you can tell your customer this is normal and can be ignored.

If this really bothers them, an alternate way is to set two variables at the process level, and disable the agent at the system level. Details of these two variables is in the doc. This way only processes which set these variables are actually injected.

Thanks Joe. That's what I figured but now I'll be empowered with knowledge!

Just wanted to jump in and say there is a DT_DISABLEINITIALLOGGING environment variable you can set that will disable all logging until the agent finds a proper configuration.


In your case this was benign, but you may (as we have) end up in a situation where the additional log entries impact result codes in a batch execution. In our case, it was causing build failures on developer machines that we are working to integrate Dynatrace into our development process because the NUGET package manager's package restore was being interpreted as failing due to the messages being logged to console. We addressed by setting the DT_LOGLEVELCON environment variable on the workstation to a value of "OFF" and it solved our problem.