Recently, our SCCM server ran out of disk space. Ran Treesize Pro on the data drive and saw that the BADMIFS folder was 97GB! I would clear the folder and it would quickly grow in size again. In Microsoft Configuration Manager (SCCM), BADMIFS refers to a folder that stores hardware inventory files (MIF files) that failed to process correctly on the site server. These MIF files (Management Information Format) are generated by SCCM clients during hardware or software inventory scans and uploaded to the server for database insertion. When SCCM’s Inventory Data Loader (dataldr) component cannot successfully parse or import a MIF, it places it into the BADMIFS directory for troubleshooting and cleanup.
By default and design, SCCM will only process MIF files 50MB or less in size. The files that were filling the BADMIFS folder were > 200MB! Our normal SCCM administrator was out, so I had ChatGPT+ whip up a Powershell script to delete the *.MIF files in the BADMIFS folder via the task scheduler every 10 minutes.
I decided to go further and had ChatGPT+ create this script: inspect_mif_file.ps1. This will inspect the WMI classes within the MIF and give us a count of each of the inventory classes.
As you can see below, NT_LOG_EVENT makes up 1.2 million rows of data! The other classes only take up a few hundred or thousand lines.

When the SCCM administrator returned, he indicated he was trying to scrape the event logs for BSOD events.
Unchecking NT Log Event in the Default Client Settings-Hardware Inventory Classes fixed the issue, though not immediately. There will be a backlog of incoming inventory MIFs, so you’ll need to keep the cleanup script running for a few days.

- Soli Deo Gloria
