How to Fix WMI issues automatically

While Ago I have posted a solution on how to fix WMI(Windows Management Instrumentation) issues using simple batch script that stops WMI service and recompile all MOF files etc. http://eskonr.com/2009/03/how-to-troubleshoot-the-systems-which-has-wmi-issues-rebuild-wmi-repository/ While working with new windows 7 migration project, we had lot of computers with wmi issue but how to identify which has wmi and fix…