Using a WMI Tester Utility to see of SQL Server information can be retrieved for Discovery Services

Version 3

    Verified Product Versions

    Endpoint Manager 9.5Endpoint Manager 9.6Endpoint Manager 2016.xEndpoint Manager 2018.x

    Description: This article is a method of testing Windows Management Interface (WMI) classes to see if they are working properly. Data Analytics uses WMI calls remotely with Discovery Services in order to gather detailed information on SQL Server for Software License Monitoring. The following document references the procedure in Discovery Services. Sometimes the WMI information on a machine may become corrupted and as a result will not return information correctly. Instead an error is returned in the Discovery log located in the C:\Program Files\LANDesk\ManagementSuite\MP_Log folder. See below


    Microsoft SQL Server Licenses (Discovery Services article)



    ERROR 9/16/2015 7:37:46 AM: Thread WMI0:WMIDiscover.DoWork, Error processing rule Computer.Device ID Object reference not set to an instance of an object.    at ManagedPlanet.DiscoveryServices.WmiRegistry.RegistryConnection.GetRegistryProperties(String machineName, ConnectionOptions options, RegistryObject propertiesHolder)

       at ManagedPlanet.DiscoveryServices.WmiRegistry.RegistryRemote.GetRegistryProperties()

       at ManagedPlanet.DiscoveryServices.WmiRegistry.RegistryRemote..ctor(String userName, String password, String domain, String machineName)

       at ManagedPlanet.DiscoveryServices.WMIDiscoverThread.GetRegistryData(WMIRule rule, WindowsLoginSetting login, String sAddress)

       at ManagedPlanet.DiscoveryServices.WMIDiscoverThread.DoWork()


    Test for WMI:


    1- Find what classes are listed.


    2- Download a test utility. Example used in this document: Paessler


    3- Configure and run the test utility. See below:


    The following screen shot shows the configuration options for the Paessler utility.


    Namespaces to test with:

    SQL Server 2005



    SQL Server 2008/2008 R2:



    SQL Server 2012



    SQL Server 2014



    Change Query to Custom and type:

    select * from SqlServiceAdvancedProperty



    The following screen shot shows additional configuration options as well as the results of the test query. You can see various information about SQL Server displayed in the window. If this information isn't present then the call failed to work and WMI will need to be repaired. Repairing WMI is part of the operating system and outside the scope of support. Microsoft or other utilities on the web may be able to help.




    Additional Notes:


    If an error is displayed then the class may need to be changed: (Example: root\Microsoft\SqlServer\ComputerManagement12 to root\Microsoft\SqlServer\ComputerManagement11




    If nothing is returned like below...then that is usually the cause of the error above regarding "object reference not set to an instance of an object".