Client Management Suite

 View Only
  • 1.  WMI Repair Script to fix HW Inv Problem

    Posted Feb 06, 2014 09:57 AM

    Hi Guys,

    I am having problems getting hardware inventory on my clients and after uninstalling/reinstalling the SMA as well as trying things with support it appears WMI may be broken. Has anyone used a relatively reliable script for repairing WMI (I have seen quite a few out there) that assumes it is broken and attempts to repair it?

    %systemdrive%
    cd %windir%\system32\wbem
    net stop winmgmt /y
    for /f %s in ('dir /b *.dll') do regsvr32 /s %s
    if exist repository.old rmdir /s /q repository.old
    rename repository repository.old
    wmiprvse /regserver
    winmgmt /regserver
    net start winmgmt

     



  • 2.  RE: WMI Repair Script to fix HW Inv Problem

    Posted Feb 06, 2014 03:59 PM

    From Microsoft:- 

    https://blogs.technet.com/b/askperf/archive/2009/04/13/wmi-rebuilding-the-wmi-repository.aspx

    http://technet.microsoft.com/en-us/library/ff404265.aspx (more interesting)



  • 3.  RE: WMI Repair Script to fix HW Inv Problem

    Posted Feb 07, 2014 12:43 PM

    Good ideas and all, but I was looking for something Altiris Admins may have used or how about a custom report someone may have written identifying instances where WMI is broke or non-functional? If other desktop managements systems can provide this level of information (Dell Kace does) then why not Altiris? Don't get me wrong I have a strong preference towards Altiris.



  • 4.  RE: WMI Repair Script to fix HW Inv Problem
    Best Answer

    Posted Feb 08, 2014 08:14 AM

    You could deploy the tool via a MSD and have it run with some of its switches.  For instance, you caould run it in SMS mode.  If you have a monitoring tool, either Altiris Monitor Solution, or some other tool, then you could use the LogWMIState switch and then have the monitoring tool look for "The overall state of the WMI service: Success, Warning, Error." events.  You could then have remediation actions configured for warning and error return values.

    You could also add a custom inventory scan to the MSD so that it gathers the following three events and places them into a table:

    • The time the tool started.
    • The overall state of the WMI service: Success, Warning, Error.
    • The time the tool ended.

     

    The above methods will allow you to create a report based off of that information.