Forum Discussion
Tens of Thousands of temp files created by AAD Connect ADDS Heath Monitoring Agent
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?
- Josh VillagomezMicrosoft
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
- Josh VillagomezMicrosoft
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
- Steve WhitcherBronze Contributor
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. :(
- Adam FowlerIron Contributor
Bumping as we see this same issue. First box I checked had 160k files in that folder from this service (which is otherwise great!)