Forum Discussion

Steve Whitcher's avatar
Steve Whitcher
Bronze Contributor
Dec 20, 2017

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? 

  • Adam Fowler's avatar
    Adam Fowler
    Iron 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!)

  • 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 Villagomez's avatar
      Josh Villagomez
      Icon for Microsoft rankMicrosoft

      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

      • Adam Fowler's avatar
        Adam Fowler
        Iron Contributor

        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.

Resources