Extracting Device Names from Bad MIFs in ConfigMgr

If you are here, you either know what a BADMIF is or Google brought you here after you searched for something like “Large number of BADMIFS” or “Can I delete BADMIFS” or something like that. Anyway, if you want great info on what MIFs are and some great in-depth troubleshooting steps for them, you should check out Umair Kahn’s post over on Tech Community (migrated from Technet). It’s a bit old, but still very relevant.

This post is to simply share a script that I wrote as I was dealing with a large quantity of bad MIFs. I actually used Umair’s to help with the process but ultimately wanted to clear out all of the backlogged MIF files stuck in the <installdir>\Program Files\Microsoft Configuration Manager\inboxes\auth\dataldr.box\BADMIFS folder on my ConfigMgr site server.

I had recently made some changes to client inventory and they were causing an unusual amount of MIFs to fail when being processed on the server. Before I removed them, I wanted to know which machines had created them to see if I could see a pattern or find repeat offenders. The script is very simple. It gets all of the MIFs in the BADMIFs folder and parses the content of them to determine the computer name in the file.

Here’s an example of the beginning of a MIF file. As you can see, NetBIOS name is listed on the 4th line. The script looks for that line and extracts the devicename.

The output will show you the Device Name, Type of “badness” and the Path to the bad MIF.

Warning: You may want to make a copy of the BADMIFS directory and change the path to use your copy so you aren’t reading in live MIF files and potentially causing issues on your production server. You’ve been warned.

You can grab a copy of the latest version of the script on my GitHub repo here.

No Comments


This site uses Akismet to reduce spam. Learn how your comment data is processed.


Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://dc.services.visualstudio.com/v2/track` resulted in a `400 Invalid instrumentation key` response: {"itemsReceived":1,"itemsAccepted":0,"errors":[{"index":0,"statusCode":400,"message":"Invalid instrumentation key"}]} in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/application-insights/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/application-insights/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/application-insights/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response)) #2 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/application-insights/vendor/guzzlehttp/promises/src/Promise.php(156): Guzzle in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/application-insights/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113