Microsoft Secure Tech Accelerator
Apr 03 2024, 07:00 AM - 11:00 AM (PDT)
Microsoft Tech Community

Tens of Thousands of temp files created by AAD Connect ADDS Heath Monitoring Agent

Bronze Contributor

While investigating a 2008R2 server with low space on the system volume, I discovered over 65,000 .gz files in the directory c:\windows\temp\.  Most of the files were under 500B, with some as large as 4KB, and all were named similar to:

20170728T235422Z-20170729T002423Z-SERVERNAME-f426dd936f9c4f1d852df3185b50d2a7.json.gz

 

I ended up deleting any of these files with a modified date more than 6 months old (62,000+ files), so that I could actually browse the directory using File explorer and continue working on the drive space issue.  

 

Using Procmon, I determined that these files are being created by "Microsoft.Identity.Health.Adds.MonitoringAgent.Startup.exe", which is part of AAD Connect Health's ADDS monitoring.  

 

I checked on a couple of other domain controllers, including one running server 2016, and found that each had 58k-63k of these files in c:\windows\temp.  

Why is the health agent creating so many files, and not cleaning up after itself? 

8 Replies

Bumping as we see this same issue. First box I checked had 160k files in that folder from this service (which is otherwise great!)

Thanks Steve for reporting this. Since this post, a few customers have reported the behavior and the proper development teams have been informed. Manually deleting the files is obviously not a solution. I will post an update if I see any progress on this. Thank you.  - Josh

Just update on this issue. I consulted the product team and unfortunately, there are no plans to mitigating this issue during this fiscal year. The only workaround as of now is to remove the files manually. I wish I had better news. In due time, I do believe the agent will be improved. - Josh

Thanks for the update Josh. I'm very surprised by this response though - this is going to get worse the longer Microsoft waits, and the wider impact of more people adopting the health monitoring agent. Plus, it shouldn't be hard to fix.

Wow, I'm amazed that there are no plans to fix this issue.  It should be simple to fix, and is bound to cause problems sooner or later for everyone who uses AAD Connect ADDS Health Monitoring.    :(

 

 

Good news, this has now been fixed :) Client should have auto updated, and temp files not being created anymore.

Can you confirm the version number that included this fix?

 

I updated to version 1.1.750.0 but it is still generating the temp files.

Hi Dean,

Just checked and looks like we have 3.0.176 - You've linked to Azure AD Connect rather than AAD Connect Health... (yeah the names are a bit confusing!).