Rebuilding WMI repository

Rebuilding WMI repository

Description

  • If your Windows device is having issues reading from the Windows Management Interface (WMI) repository, you may need to re-sync the repository as a troubleshooting step

  • Misconfigured Monitoring Service gives the following error:

    • "102 There is no information found for this WQL Query: Please check the parameters"

Solution

  • To perform a repair/re-sync of the WMI repository, please do the following:
    • Run the following commands in an administrative Command Prompt on the machine being monitored:
      • For Windows XP and Windows 2000 Servers:
  1. winmgmt /clearadap
  2. winmgmt /kill
  3. winmgmt /unregserver
  4. winmgmt /regserver
  5. winmgmt /resyncperf
  • For Windows 2003 Servers:
    1. wmiadap.exe /c
    2. wmiadap.exe /f
    3. lodctr /R
  • For Windows 7 and Windows 2008 Servers:
    • winmgmt /salvagerepository
  • To perform a rebuild of the WMI repository, please do the following:
    1. Disable and stop the winmgmt service
    2. Remove or rename C:\Windows\System32\wbem\repository
    3. Enable and start the winmgmt service
    4. Open Command Prompt as Administrator
    5. Run the following commands:
      1. cd C:\Windows\System32\wbem\
      2. for /f %s in ('dir /b *.mof') do mofcomp %s
        • NOTE: This will take a minute or so to complete.
      3. for /f %s in ('dir /b en-us\*.mfl') do mofcomp en-us\%s
    6. Open Performance Monitor to verify that all counters can be loaded


 
  •    To perform a repair/re-sync of the  Windows 10 WMI repository, please do the following
               1.  Open an elevated command prompt.

               2.    Verify the WMI repository is not corrupt by running the following command:

                                winmgmt /verifyrepository

          If the repository is not corrupted, a “WMI Repository is consistent” message will be returned. If you get something else, go to step 3. If the repository is consistent, you              need to troubleshoot more granularly. The repository is not the problem.

             3. Run the following commands to repair WMI:

                                 winmgmt /salvagerepository

           If the repository salvage fails to work, then run the following command to see if it resolves the issue:

                                 winmgmt /resetrepository

          After the last command, there should be a “WMI Repository has been reset” message returned that verifies the command was successful.


                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • Configuring a non-admin user for WMI monitoring (domain level)

                        For non-admin users to perform WMI monitoring in OpManager, the user profiles need to be configured accordingly in your network. This can be done: On a device level (configuring individual devices) - Link to KB On a domain level (configuring the ...
                      • Testing the WMI connection with WBEMTEST

                        To check if the connection between OpManager server and the monitored device is clear, Please perform the below steps, 1. From OpManager server, click on "Start>Run--->wbemtest" and click on ok. This will launch WMI tester. 2. Click on "Connect" and ...
                      • Configuring a non admin user for WMI monitoring

                        Configuring a non-admin user for WMI monitoring You can configure a regular Windows user to access WMI information by adding the necessary user account to the Distributed COM Users and the Performance Monitor Users group using lusrmgr.msc, and then ...
                      • WMI credentials does not pass with error "RPC Server Unavailable"

                        Steps to troubleshoot "RPC Server Unavailable Error" when adding Windows Server through WMI mode in OpManager. 1) Try to add the server using domain-name\username and with username alone. 2) Check whether you are able to ping the remote windows ...
                      • Not able to see databases while adding MSSQL monitors in OpManager

                        Issue/Scenario: When I try to add the application monitor, I get to the stage to add databases there are none to be selected. This issue could occur if the SQL servers WMI agent is not responding to the WMI request which results "null" i.e the WMI ...