Close Menu
    Facebook X (Twitter) Instagram
    Monday, June 23
    X (Twitter) LinkedIn
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»SCCM 2007»How to troubleshoot the systems which has WMI issues ? (Rebuild WMI Repository)

    How to troubleshoot the systems which has WMI issues ? (Rebuild WMI Repository)

    Eswar KonetiBy Eswar KonetiMarch 18, 7:18 pm2 Mins Read SCCM 2007 17,031 Views
    Share
    Facebook Twitter LinkedIn Reddit

    Had several systems which had wmi issue in doing client /application installation.This is most common issue which we face if something happens to the system.To get solved,use the script which can be run remotely using psexec tool. http://blogs.technet.com/b/configmgrteam/archive/2009/05/08/wmi-troubleshooting-tips.aspx

    Note : The below script tested only on Windows XP ,not tested on higher versions like Windows 7

    Download the psexec tool from Microsoft .Here are the basic instruction in doing it.

    1.copy the psexec.exe tool on to new folder (G:\script) and create 3 new files(wmifix.bat,computers.txt and run.bat).Each file script has given below.

    wmifix:

    @echo off
    REM  WMI Repair
    Title WMI Repair script running on the client machines

    %windir%\system32\wbem\winmgmt /clearadap
    %windir%\system32\wbem\winmgmt /kill
    %windir%\system32\wbem\winmgmt /unregserver
    %windir%\system32\wbem\winmgmt /regserver
    %windir%\system32\wbem\winmgmt /resyncperf

    net stop winmgmt /y

    REM if exist %windir%\system32\wbem\repository.old rmdir /s /q %windir%\system32\wbem\repository.old
    REM ren %windir%\system32\wbem\repository repository.old

    regsvr32 /s %systemroot%\system32\scecli.dll
    regsvr32 /s %systemroot%\system32\userenv.dll

    for /f %%s in ('dir /b /s %windir%\system32\wbem\*.dll') do regsvr32 /s %%s

    for /f %%s in ('dir /b /s %windir%\system32\wbem\*.mof') do mofcomp %%s
    for /f %%s in ('dir /b %windir%\system32\wbem\*.mfl') do mofcomp %%s

    net start winmgmt
    %windir%\system32\wbem\wmiprvse /regserver

    run.bat

    @echo off
    cd G:\script
    G:
    psexec @computers.txt -c G:\script\wmifix.bat

    computers.txt

    Add list of computers to the txt file which you have trouble.

    Use the above script to fix wmi issues on computers,if that doesnt repair,remove the bold letters REM and try.this will delete the repository and recreates it for you to work wmi correctly.

    more information about troubleshooting can be found from http://blogs.technet.com/configmgrteam/archive/2009/05/08/wmi-troubleshooting-tips.aspx

    Fix WMI How to Rebuild WMI How to troubleshoot the systems which has WMI issues Troubleshoot WMI issues WMI Fix WMI is not working how to Fix
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    How to detect the source of registry key modifications on windows devices – Intune

    November 21, 8:49 pm

    Identifying devices managed by Intune but not reporting to WUfB using KQL

    November 09, 10:28 am

    Application Deployment with Hybrid Joined Requirement Rules in Intune

    October 06, 8:59 pm

    16 Comments

    1. Mohit Bhatia on August 12, 2014 11:39 PM

      Thanks for your swift reponse. This report is for SCCM 2012 environment but we are using 2007 currently. Do you have similar kind of report for SCCM 2007 version.

      Reply
      • Eswar Koneti on August 13, 2014 7:19 AM

        you will have to install client health status reporting tool to get such information.By default,there is no such info you get from CM07 and only possible things is to get,how many clients active,inactive,obsolete etc.

        Reply
    2. Mohit Bhatia on August 12, 2014 2:56 AM

      Do you have any script or sccm report which can tell me which clients are healthy, which are not healthy with the reason and which clients have WMI issues.

      We are facing issues on many machines where RAP is blank. Just want to automate things.

      Reply
      • Eswar Koneti on August 12, 2014 11:28 AM

        have you tried this report ? http://eskonr.com/2014/05/sccm-configmgr-2012-ssrs-dashboard-client-health-summary-report/

        Reply
    3. Mike on June 2, 2013 10:00 AM

      Hi Eswar,

      I have tried using this script and the result shows as below: Does this mean the Script ran successfully and WMI repair was done or not, kindly suggest.

      The following services are dependent on the Windows Management Instrumentation s
      ervice.
      Stopping the Windows Management Instrumentation service will also stop these ser
      vices.

      Intel(R) Rapid Storage Technology
      Dell ControlPoint System Manager
      Dell ControlPoint Button Service

      The Intel(R) Rapid Storage Technology service is stopping..
      The Intel(R) Rapid Storage Technology service was stopped successfully.

      The Dell ControlPoint System Manager service is stopping.
      The Dell ControlPoint System Manager service was stopped successfully.

      The Dell ControlPoint Button Service service is stopping.
      The Dell ControlPoint Button Service service was stopped successfully.

      The Windows Management Instrumentation service is stopping.
      The Windows Management Instrumentation service was stopped successfully.

      The system cannot find the file ædir.
      The system cannot find the file ædir.
      The system cannot find the file ædir.
      The requested service has already been started.

      More help is available by typing NET HELPMSG 2182.
      wmifix.bat exited on \\Machine Name with error code 0.

      Regards,
      Mikey

      Reply
      • Eswar Koneti on June 2, 2013 12:18 PM

        from the above snippet,script ran with exit code 0 successfully.Did u see any mof files complied on computer ?

        Reply
    4. Tolga on January 31, 2013 11:17 AM

      I think it will work on a 2008 server but frankly I didn't try it.
      I'll let you know if I give it a try.
      Thanks.

      Reply
    5. Tolga on January 28, 2013 1:26 PM

      Hi Eswar,

      Thank you for the valuable info.
      Any updates for Server 2008 and newer?

      Thanks,
      Tolga

      Reply
      • Eswar Koneti on January 31, 2013 5:57 AM

        I cont find reason why it wouldnt work on server 2008 ? did you try it on any server ?

        Reply
    6. Daya on January 25, 2013 7:49 PM

      Hi Ismail,
      Please do check your DP and MP and also check if machine's polocy is working fine.
      I dealt the same type of issue in my environment and there was a issue with DP.

      Reply
    7. Ismail on January 17, 2012 9:28 PM

      hi eswar,
      i have distribute one package to 2 test pc. the package is working fine in one pc.i have tried to open the app in another test pc.. it will loading and disappeared. i do not know y dis was happened. and also i have tried to repair the app in ARP. it throws an error msg "Fatal error during installation".

      could u plz send reply ASAP?

      Reply
    8. ismail on December 13, 2011 2:30 PM

      Hey koneti,
      how can I add a "safe sender" entry via script or is there a
      command line I can use to do it? I am looking for something
      sprcifically unrelated to the UI entry method, something scriptable
      that I can wrap and deploy to remote workstations in my enterprise.

      Reply
      • Eswar Koneti on December 20, 2011 11:16 AM

        Hi,
        I think you are talking about Junk mails in Outloook ? you can do this Via GPO rather going for scripts .Look at technet article http://technet.microsoft.com/en-us/library/cc179183.aspx

        Reply
    9. ismail on December 5, 2011 8:14 PM

      hi eswar,

      Hope you are doing gud.. I want to Create a script to configure settings in Internet Explorer.

      The option “Automatically detect settings” should be blank (not selected) for all users and for the default user.
      is this possible to create VB Script for that?
      can i have any links ?

      Reply
    10. ismail on November 25, 2011 3:46 PM

      Hi eswar.
      I am working on SMS environment. We have some of the clients hasn't reporting to sms server for last 30 days.i found the error is SMS agent issue. Is there any Script for repair the sms agent service?. and one more thing is that when i am trying to ping the machines with ipaddress ,its resolving another machine.

      If u have any script for repair sms agent in Sms client,provide me ASAP.

      thanks ,
      Ismail

      Reply
      • Eswar Koneti on November 25, 2011 4:36 PM

        Hi Syed,
        How do you say issues with SMS agent ? and for Ip address conflits,you have DNS issue .Please do scavenging on DNS server .BEfore that verify if single IP address is assiged to multiple computers (you should see many entries in DNS) as i saw this many times in my environment.

        Reply

    Leave a ReplyCancel reply

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

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2024 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.