Wmi обнаружена ошибка

Любой бывалый Windows-админ периодически сталкивается с проблемами в работе службы WMI (Windows Management Instrumentation) и ее компонентах. Наличие проблем в подсистеме WMI является критичным с точки зрения нормального функционирования Windows, поэтому администратору необходимо проверить и восстановить работоспособность WMI. В этой статье мы опишем простую методику диагностирования и устранения неполадок службы WMI в Windows.

О наличии проблем с WMI может свидетельствовать широкий спектр ошибок:

  • Ошибки обработки WMI запросов в системных журналах и логах приложений (
    0x80041002 - WBEM_E_NOT_FOUND
    ,
    WMI: Not Found
    ,
    0x80041010 WBEM_E_INVALID_CLASS
    );
  • Ошибки обработки GPO, связанные на WMI ( некорректная работа wmi фильтров групповых политик, и пр.);
  • WMI запросы выполняются очень медленно;
  • Ошибки при установке или работе агентов SCCM/SCOM;
  • Ошибки в работе скриптов (vbs или PowerShell), использующих пространство имен WMI (скрипты с Get-WmiObject и т.д.).

Содержание:

  • Диагностика проблем с WMI
  • Исправление WMI репозитория, перерегистрация библиотек, перекомпиляция MOF файлов
  • Сброс и пересоздание WMI репозитория (хранилища)

Диагностика проблем с WMI

В первую очередь нужно проверить служба Windows Management Instrumentation (Winmgmt) установлена в Windows и запущена. Вы можете проверить состояние службы в консоли services.msc или с помощью PowerShell:

Get-Service Winmgmt | Select DisplayName,Status,ServiceName

служба Windows Management Instrumentation (Winmgmt) работает

Если служба Winmgmt запущена, вы можете проверить работоспособность WMI, обратившись к ней с помощью простого WMI-запроса. Вы можете выполнить wmi запрос из командной строки или из PowerShell. Например, следующая команда выведет список установленных в Windows программ:

wmic product get name,version

Простейшая PowerShell команда для получения информации о версии и билда Windows 10 через WMI может выглядеть так:

get-wmiobject Win32_OperatingSystem

powershell проверка работы wmi командой get-wmiobject

Как вы видите, служба WMI ответила на запрос корректно. Если при выполнении такого WMI-запроса Windows возвращает ошибку, скорее всего сервиса WMI работает некорректно, поврежден WMI репозиторий или есть какие-то другие проблемы.

ошибка Failed to initialize all required WMI classes

В моем случае, например, при открытии свойств WMI Control в консоли управления компьютером (compmgmt.msc) появлялась надпись:

Failed to initialize all required WMI classes
Win32_Processor. WMI: Invalid namespace
Win32_WMISetting. WMI: Invalid namespace
Win32_OperationSystem. WMI: Invalid namespace

Ранее для диагностики WMI существовала официальная утилита от Microsoft – WMIDiag.vbs (Microsoft WMI Diagnosis). WMIdiag это vbs скрипт, который проверяет различные подсистемы WMI и записывает собранную информацию в лог файлы (по умолчанию логи находятся в каталоге %TEMP% — C:\USERS\%USERNAME%\APPDATA\LOCAL\TEMP\). Получившийся отчет состоит из файлов, имена которых начинаются с WMIDIAG-V2.2 и включает в себя следующие типы фалов:

  • .log файлы содержат подробный отчет об активности и работе утилиты WMIDiag;
  • .txt файлы содержат итоговые отчеты о найденных ошибках, на которые стоит обратить внимание;
  • В .csv файлах содержится информация, нужная для долгосрочного анализа работы подсистемы WMI.

скрипт для исправления ошибок WMI WMIDiag.vbs

Совет. В 64 битных версиях Windows wmidiag нужно запускать так:

c:\windows\System32\cscript.exe wmidiag.vbs

в противном случае появится ошибка:

WMIDiag must be run from native 64-bit environment. It is not supported in Wow64.

WMIDiag It is not supported in Wow64

После окончания работы утилиты WMIDiag администратор должен изучить полученные файлы логов, проанализировать и попытаться исправить найденные ошибки.

К сожалению, последняя версия WMIDiag 2.2 корректно работает только с версиями до Windows 8.1/Windows Server 2012 R2. На данный момент Microsoft даже удалила ссылку на загрузку WMIDiag из Download Center. Но при желании, этот скрипт можно найти в сети.

WMIDiag может дать подробную информацию по исправлению частных ошибок в WMI, но в большинстве случаев процесс это довольно трудоемкий и стоит потраченного времени только при решении инцидентов в критичных системах (как правило, на продуктивных серверах). Для массового сегмента рабочих станций пользователей сбросить и пересоздатьWMI репозиторий в Windows.

Исправление WMI репозитория, перерегистрация библиотек, перекомпиляция MOF файлов

В Windows 10/Windows Server 2016 вы можете проверить целостность репозитория WMI с помощью команды:

winmgmt /verifyrepository

winmgmt-verifyrepository - проверка состояния репозитория wmi

Если команда возвращает, что база данных WMI находится в неконсистентном состоянии (INCONSISTENT или WMI repository verification failed), стоит попробовать выполнить “мягкое” исправление ошибок репозитория:

Winmgmt /salvagerepository

WMI repository has been salvaged.

Данная команда выполняет проверку согласованности хранилища WMI и при обнаружении несогласованности перестраивает базу данных WMI.

Перезапустите службу WMI:

net stop Winmgmt
net start Winmgmt

Если стандартный способ исправления ошибок в WMI не помог, попробуйте следующий скрипт. Данный скрипт представляет собой ”мягкий” вариант восстановления службы WMI на компьютере (выполняется перерегистрация dll библиотек и службы WMI, перекомпилируются mof файлы). Данная процедура является безопасной и ее выполнение не должно привести к каким-либо новым проблемам с системой.

sc config winmgmt start= disabled
net stop winmgmt
cd %windir%\system32\wbem
for /f %s in ('dir /b *.dll') do regsvr32 /s %s
wmiprvse /regserver
sc config winmgmt start= auto
net start winmgmt
for /f %s in ('dir /b *.mof') do mofcomp %s
for /f %s in ('dir /b *.mfl') do mofcomp %s

На 64 битной версии Windows эти действия нужно также выполнить для каталога SysWOW64. Замените третью строку на

cd %windir%\SysWOW64\wbem

bat скрипт для перерегистрации компонентов wmi

Указанные команды можно выполнить путем простой вставки в окно командой строки, либо сохранить код в bat файле wmi_soft_repair.bat и запустить его с правами администратора. После окончания работы скрипта, перезагрузите Windows и проверьте работу WMI.

Сброс и пересоздание WMI репозитория (хранилища)

Если вам не помогли мягкие способ восстановления WMI, рассмотренные выше, придется перейти к более “жесткому” способу восстановления работоспособности службы WMI, заключающегося в пересоздании хранилищаWMI.

WMI репозиторий (хранилище) находится в каталоге
%windir%\System32\Wbem\Repository
и представляет собой базу данных, в которой содержится информация о метаданных и определениях WMI классов. В некоторых случаях WMI репозиторий может содержать статическую информацию классов. При повреждении репозитория WMI, в работе службы Windows Management Instrumentation (Winmgmt) могут наблюдаться ошибки вплоть до полной невозможности ее запустить.

Если вы подозреваете, что репозиторий WMI поврежден, имейте в виду, что его пересоздание — это последняя шаг, к которому нужно прибегнуть только тогда, когда другие операции не помогают реанимировать WMI.

Следующая команда выполнит сброс базы данных WMI к исходному состоянию (как после чистой установки Windows). Используйте эту команду для выполнения hard reset репозитория WMI, если параметре salvagerepository не исправил проблему:

Winmgmt /resetrepository

Совет. На практике бывают случаи, когда пересоздание хранилища WMI приводит к проблемам со сторонним софтом. Это связано с тем, что все записи в базе WMI обнуляются (до состояния чистой системы). Такие программы скорее всего, придется переустанавливать в режиме восстановления.

Если обе команды (
Winmgmt /salvagerepository
и
Winmgmt /resetrepository
) не восстановили консистентное состояние базы WMI, попробуйте выполнить “жесткое” пересоздание базы WMI вручную таким скриптом:

sc config winmgmt start= disabled
net stop winmgmt
cd %windir%\system32\wbem
winmgmt /resetrepository
winmgmt /resyncperf
if exist Repos_bakup rd Repos_bakup /s /q
rename Repository Repos_bakup
regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll
for /f %s in ('dir /b *.dll') do regsvr32 /s %s
for /f %s in ('dir /b *.mof') do mofcomp %s
for /f %s in ('dir /b *.mfl') do mofcomp %s
sc config winmgmt start= auto
net start winmgmt
wmiprvse /regserver

сброс и восстановление хранилища wmi в windows 10

На 64 битной версии Windows нужно также перерегистрировать dll/exe и перекомпилировать mof файлы в каталоге %windir%\sysWOW64\wbem.

Данный скрипт полностью пересоздает хранилище WMI (старый репозиторий сохраняется в каталог Repos_bakup). После окончания работы скрипта нужно перезагрузить Windows. Затем протестируйте работу службы WMI простым запросом.

Проверьте состояние WMI репозитория. Если ошибки исправлены, команда
winmgmt /verifyrepository
должна вернуть:

WMI repository is consistent

WMI repository is consistent

В этой статье мы собрали основные способы, позволяющие продиагностировать и устранить неполадки службы и репозитория WMI.

Table of Contents

  • WMI Service: Access Denied
    • Symptoms:
    • Troubleshooting:
    • Security Descriptors by Operating System Version

WMI Service: Access Denied

There are times when the WMI Service within Microsoft Windows  becomes corrupt, or the permissions are incorrect.  This leads to access
denied errors  when performing updates or other maintenance. This guide will show you how to check and repair the WMI Permissions on directories, as well as the WMI Service to ensure that it is configurable and workable.

Symptoms:

1. When installing software such as Microsoft Exchange Service Pack Upgrades, you may be greeted with an Access Denied
message

2. When attempting to stop, start or restart the Winmgmt service, the options are greyed out (GUI)
or you receive Access Denied (Command line) 

Troubleshooting:

 You will be making changes to permissions and registry entries, as well as some system permissions. Please make sure you have a good backup of the server or computer before continuing. If you are not comfortable making the
changes, there is a good chance you can corrupt your Windows Installation.

1. Log into Windows as an Administrative User

2. Check permissions on C:\:

Administrators: Full Control
System: Full Control
Users: Read
Authenticated Users: Read
Everyone: Read

3. Check permissions on C:\Windows\System32

Administrators: Full Control
System: Full Control
Users: Read
Authenticated Users: Read
Everyone: Read

4. Check permissions on C:\Windows\Registration

Administrators: Full Control
System: Full Control
Users: Read
Authenticated Users: Read
Everyone: Read

5. Check permissions on C:\Windows\Registration\*.clb (any file with the file extension .clb)

Administrators: Full Control
System: Full Control
Users: Read
Authenticated Users: Read
Everyone: Read

6. Open the Registry Editorregedit

7. Navigate to HKEY_Classes_Root\CLSID

8. Check permissions on CLSID

Administrators: Full Control
System: Full Control
Users: Read
Authenticated Users: Read
Everyone: Read
Computer: Read

9. Open an elevated command prompt

10. Check the security descriptors for WinMGMT by using the command sc
sdshow winmgmt

 The security descriptors are different based on Operating System version and service pack. Below are some suggested descriptors. They should match what you see in the command above, if not the command to change them is below.

Security Descriptors by Operating System Version

Windows Server 2012: D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SO)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)

Windows Server 2008 R2 SP1: D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SO)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)

Windows Server 2008 SP2 x64: D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)

Windows 8.1 x64: D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)

Windows 7 SP1 x86: D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)

Windows 7 SP1 x64: D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)

Windows XP SP3 x86: D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)

11. If the security descriptors are not correct for you operating system version, then run the command sc sdset winmgmt *DESCRIPTORS* where
*DESCRIPTORS* is the appropriate set for your Operating System Version. (See above)

12. Restart the Server/Computer and check the WMI Service to see if the issue is resolved.

Every experienced Windows administrator has faced some issues with the WMI service (Windows Management Instrumentation) and its components. The problems in WMI subsystem are critical for the normal operation of Windows, therefore the administrator needs to check and restore the functionality of WMI as soon as possible. In this article we’ll describe quite a simple technique of troubleshooting and fixing WMI problems on Windows 10 and Windows Server 2016/2019.

A problem with the WMI may indicate a wide range of errors:

  • The errors on the WMI queries processing in the system and application logs (0x80041002 - WBEM_E_NOT_FOUND, WMI: Not Found, 0x80041010 WBEM_E_INVALID_CLASS);
  • GPO processing errors related with WMI (incorrect work of the WMI-filters of Group  Policies, etc.);
  • WMI queries are very slow;
  • Errors during installation or operation of SCCM/SCOM agents;
  • Errors in scripts (VBS or PowerShell) that use the WMI namespace (scripts with Get-WmiObject, etc.)

Contents:

  • Troubleshooting WMI Problems
  • Repairing the WMI Repository and Recompiling MOF Files
  • Rebuilding the WMI Repository

Troubleshooting WMI Problems

The first step is to check the Windows Management Instrumentation (Winmgmt) service is installed on Windows and running. You can check the status of the service in the services.msc console or using PowerShell:

Get-Service Winmgmt | Select DisplayName,Status,ServiceName

check that the Winmgmt service (Windows Management Instrumentation) is running

If the Winmgmt service is running, you can test the health of WMI by quering it with a simple WMI command. You can execute wmi request from command prompt or from PowerShell. For example, the following command will list the programs installed on Windows:

wmic product get name,version

The simplest PowerShell command to get information about the version and build of Windows 10 via WMI might look like this:

get-wmiobject Win32_OperatingSystem

test wmi using powershell cmdlet get-wmiobject

As you can see, the WMI service responded to the request correctly. If Windows returns an error when executing such a WMI query, most likely the WMI service is not working correctly, the WMI repository is damaged, or there are other problems.

wmi error: Failed to initialize all required WMI classes Invalid namespace

In my case, for example, when opening the WMI Control properties in the Computer Management snap-in (compmgmt.msc), the following message appeared:

Failed to initialize all required WMI classes
Win32_Processor. WMI: Invalid namespace
Win32_WMISetting. WMI: Invalid namespace
Win32_OperationSystem. WMI: Invalid namespace

Previously, the official Microsoft tool WMIDiag.vbs (Microsoft WMI Diagnosis) was used to diagnose WMI. WMIdiag is a vbs script that checks various WMI subsystems and writes the collected information to the log files (by default the logs are located in %TEMP% folder – C:\USERS\%USERNAME%\APPDATA\LOCAL\TEMP\). The resulting report consists of files with names starting with WMIDIAG-V2.2 and includes the following file types:

  • LOG files contain a detailed report report on the activity and operation of the WMIDiag tool;
  • TXT files contain the summary reports of found errors that are worth paying attention;
  • CSV files contain information necessary for a long-term analysis of the WMI performance.

wmidiag.vbs version 2.2 - script to troubleshoot wmi errors

Tip. In Windows x64 versions wmidiag should be run as follows:
c:\windows\System32\cscript.exe wmidiag.vbs
otherwise, there occurs an error:

WMIDiag must be run from native 64-bit environment. It is not supported in Wow64.

WMIDiag must be run from native 64-bit environment. It is not supported in Wow64

After WMIDiag has completed its task, the administrator should examine the log files, analyse and try to fix the found errors.

Unfortunately, the latest version of WMIDiag 2.2 works correctly only with versions up to Windows 8.1/Windows Server 2012 R2. At this point, Microsoft has even removed the link to download WMIDiag from the Download Center. But if you wish, this script can be found on the web.

WMIDiag provide detailed information on how to correct local errors in WMI, but in most cases it is a time-consuming task and is worth of the time spent only when looking for solutions to the problems in the critical systems (usually on the production servers). In case of the user workstations, it is much easier to reset and rebuild the WMI repository in Windows.

Repairing the WMI Repository and Recompiling MOF Files

On Windows 10/Windows Server 2016, you can check the integrity of the WMI repository using the command:

winmgmt /verifyrepository

winmgmt /verifyrepository

If the command returns that the WMI database is in an inconsistent state (INCONSISTENT or WMI repository verification failed), you should try doing a soft fix of WMI repository errors:

Winmgmt /salvagerepository

WMI repository has been salvaged.

This command checks the consistency of the WMI repository and rebuilds the WMI database if inconsistencies are found.

Restart the WMI service:

net stop Winmgmt
net start Winmgmt

If the standard WMI fix doesn’t work, try the following script. This script is a “soft” option for recovering the WMI service on the computer (the DLL libraries and WMI are re-registered and MOF files are recompiled). This procedure is safe and its implementation should not cause any more problems with the operating system:

sc config winmgmt start= disabled
net stop winmgmt
cd %windir%\system32\wbem
for /f %s in ('dir /b *.dll') do regsvr32 /s %s
wmiprvse /regserver
sc config winmgmt start= auto
net start winmgmt
for /f %s in ('dir /b *.mof') do mofcomp %s
for /f %s in ('dir /b *.mfl') do mofcomp %s

On a 64-bit version of Windows, these steps must also be performed for the SysWOW64 directory. Replace the third line with:

cd %windir%\SysWOW64\wbem

batch script to perform soft reset of the wmi service on windows 10

These commands can be run by simply pasting them into the command prompt, or you can save the script as a BAT file (wmi_soft_repair.bat) and run it with the administrator permissions. After the script finishes, restart Windows and check if WMI is working.

Rebuilding the WMI Repository

If the method described above has not helped, use more “hard” way of the WMI recovery that implies the recreation of the WMI repository.

The WMI repository is located in %windir%\System32\Wbem\Repository and is a database that contains information on the metadata and definitions of the WMI classes. In some cases the WMI repository can also contain static class information. When the repository is damaged, errors occur in the activity of WMI service (Winmgmt).

If you suspect that the WMI repository is damaged, keep in mind that it only should be recreated if no other means to restore WMI are effective.

The following command will reset the WMI database to its original state (as after a clean Windows install). Use this command to hard reset the WMI repository if the salvagerepository parameter didn’t fix the problem:

Winmgmt /resetrepository

Tip. In practice, there are cases, when the rebuilding of WMI repository causes problems with the third-party software. The reason is that all records in the WMI database are cleared (to the state of a clean system). Such software may have to reinstall in recovery mode.

If both commands (Winmgmt /salvagerepository and Winmgmt /resetrepository) didn’t restore the consistent state of the WMI database, try to perform a hard reset of the WMI database with the following script:

sc config winmgmt start= disabled
sc config winmgmt start= disabled
net stop winmgmt
cd %windir%\system32\wbem
winmgmt /resetrepository
winmgmt /resyncperf
if exist Repos_bakup rd Repos_bakup /s /q
rename Repository Repos_bakup
regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll
for /f %s in ('dir /b *.dll') do regsvr32 /s %s
for /f %s in ('dir /b *.mof') do mofcomp %s
for /f %s in ('dir /b *.mfl') do mofcomp %s
sc config winmgmt start= auto
net start winmgmt
wmiprvse /regserver

bat script to repair or rebuild the WMI Repository on Windows 10

On 64-bit version of Windows, you also need to re-register the DLL/EXE and recompile the MOF files in the %windir%\sysWOW64\wbem directory.

This script completely removes and recreates the WMI repository folder (the old repository is saved to the Repos_backup directory). After the script has completed, you need to restart Windows. Then check the WMI service with a simple query.

Check the WMI repository state. If the errors are fixed, the winmgmt /verifyrepository command should return:

WMI repository is consistent

winmgmt /verifyrepository WMI repository is consistent

In this article, we have showed basic ways to diagnose and troubleshoot the WMI service and repository.

There are a lot of WMI errors out there.
Way too many, right?

You as a sysadmin know that for sure – internal server errors, access denied errors,
timeout errors, failure to connect, and others. 

Here you’ll find a list of the most common WMI error codes and proven quick fix solutions:

  1. WMI error “5858” and “Result Code 0x80041032”
  2. WMI error “0x800706ba” or “RPC server is unavailable”
  3. WMI error code “0x80041002 (WBEM_E_NOT_FOUND)”
  4. WMI error message “No such interface supported”
  5. WMI error “0x80041003”, “0x80070005” or “Access denied”
  6. WMI error “1603” or “Fatal Error During Installation”
  7. WMI error “Timeout Error”
  8. WMI error “Failure to Connect” or “Connection could not be established”

And you’ll find the solution to get rid of ALL WMI errors – forever: Test PRTG and get started within minutes!

 1. WMI error:

“5858” and “Result Code 0x80041032”

time blueQuick fix

The WMI error 5858 is a common issue occurring while using the Windows server with applications that use IWbemServices:ExecQuery. The error message pops up in the Event Viewer and shows the Event ID 5858 resulting in different ResultCodes, for example “Result Code = 0x80041032 (WBEM_E_CALL_CANCELLED)”.

To solve the problem, you need to modify the WMI client application to issue calls to IEnumWbemClassObject::Next to retrieve full result sets prior to the release of the IWbemContext object. Also ensure that the timeout value is set to greater than 0 (ITimeout).

Best solution:

https://support.microsoft.com/de-de/help/3124914/wmi-activity-event-5858-logged-frequently-with-resultcode-0x80041032

 2. WMI error:

“Error 0x800706ba” or “RPC server is unavailable”

time blueQuick fix

The WMI error code 0x800706ba is a common error on Microsoft Windows XP. The error code is generated when the computer makes a request to a remote Microsoft COM+ object, but the request fails. The error code may be accompanied by the error message “RPC server is unavailable.”

The RPC server error is most commonly caused by port exhaustion due to a network disconnection after the release of the remote COM+ object on the client computer, causing further requests to the remote COM+ to fail. To fix the problem, try the hotfix provided by Microsoft.

Best solution:

https://support.microsoft.com/en-us/help/935677/fix-error-code-0x800706ba-may-be-generated-when-a-client-computer-make

 3. WMI error:

“Error 0x80041002 (WBEM_E_NOT_FOUND)”

time blueQuick fix

Are you facing error code 0x80041002 (WBEM_E_NOT_FOUND) when you try to open a WMI namespace on a Windows computer? Then you are dealing with a corrupted WMI repository. If the WMI repository is corrupted, it fails to handle an item deletion operation correctly, resulting in the described error message when you try to open a namespace.

Error 0x80041002 can be eliminated with the following troubleshoot solutions:
 

  1. Apply the supported hotfix provided by Microsoft. After applying the hotfix, restart the computer. The problem should now be solved.
  2. Another option is a workaround solution. Disable the Resultant Set of Policy (RSoP) logging policy. This should easily help you get rid of the WMI error message

Best solution:

https://support.microsoft.com/en-us/help/2465990/0x80041002-wbem-e-not-found-error-occurs-when-you-try-to-open-a-wmi-na

 4. WMI error:

“No such interface supported”

time blueQuick fix

The WMI error “No such interface supported” is caused by a credential issue. The full error message looks like this:

<result>

<error>

Failure(s) with available Windows credentials from the instance.

</error>

<error>No such interface supported</error>

In most cases, the error is caused by firewall issues. To solve the problem, ensure that you do not have a firewall between the MID server and the target IP. After disabling your firewalls, re-run the command and try again. The error should now no longer appear.

Best solution

https://hi.service-now.com/kb_view.do?sysparm_article=KB0787202

 5. WMI error:

“Error 0x80041003”, “Error 0x80070005” or “Access denied”

time blueQuick fix

The WMI error codes 0x80041003 and 0x80070005 with the description “Access denied” indicate a permission problem.

If you come across the 80041003 error, it is most definitely because you do not have the necessary permissions to perform the operation you are trying to perform in WMI. To solve the issue, first check if you have the necessary permissions. If you do, you can solve the problem by changing the WMI.bat file to rebuild the WMI values. Copy the following code and save it as WMI.bat, then run as administrator to update the settings.

@echo on

cd /d c:\temp
if not exist %windir%\system32\wbem goto TryInstall
cd /d %windir%\system32\wbem
net stop winmgmt
winmgmt /kill
if exist Rep_bak rd Rep_bak /s /q
rename Repository Rep_bak
for %%i in (*.dll) do RegSvr32 -s %%i
for %%i in (*.exe) do call :FixSrv %%i
for %%i in (*.mof,*.mfl) do Mofcomp %%i
net start winmgmt
goto End

  :FixSrv
if /I (%1) == (wbemcntl.exe) goto SkipSrv
if /I (%1) == (wbemtest.exe) goto SkipSrv
if /I (%1) == (mofcomp.exe) goto SkipSrv
%1 /Regserver
:SkipSrv
goto End
:TryInstall
if not exist wmicore.exe goto End
wmicore /s
net start winmgmt
:End

The error 80070005 means than the local Windows system is not able to verify the credentials of the target computer. To get rid of the error, check the access rights and make sure that the user account is part of the administrator group.

Best solution: https://windowsforum.com/threads/bsod-microsoft-windows-wmi-0x80041003.46244/

 6. WMI error:

“Error 1603” or “Fatal Error During Installation”

time blueQuick fix

The MMI error 1603 is a general error code indicating that something went wrong during the installation. There are several possible causes for this fatal error, such as locked files, an outdated version of Install Shield Developer, a general error, a disabled short file name creation on the target machine, or a falsely prototyped install script custom action.

Depending on the cause of the problem, you can try the following troubleshoot solutions to get rid of the Microsoft Windows Installer error 1603:

    1. Ensure that short file name creation is activated on the target machine. Access the registry entry

        HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

        and make sure that the name creation value is equal to 0. After the installation, you can reset these
        settings if necessary.

    2. Make sure that the Windows Installer Service is installed properly and on the correct systems.

    3. Delete all files in the temporary folders, as they might cause the fatal error during the installation process.

    4. Do not run any other applications in the background, and close everything before starting the installation.

Best solution:

https://community.broadcom.com/symantecenterprise/communities/community-home/librarydocuments/viewdocument?DocumentKey=94345ec7-5f4a-4614-8e74-931307668408&CommunityKey=41d8253b-a238-4563-8718-ed7623beafbc&tab=librarydocuments

 7. WMI error:

«Timeout Error»

time blueQuick fix

Does your WMI connection time out while running the Windows Management Instrumentation? A timeout error is a common problem faced by WMI users and admins. The timeout is caused by network lag issues, resulting in the computer being unable to respond in time.

To get rid of the timeout error, try the following steps: When connecting to WMI, set the wbemConnectFlagUseMaxWait flag (scripting) or the WBEM_FLAG_CONNECT_USE_MAX_WAIT in C++ value to 128 (0x80) to change the timeout on the call to two minutes. The new settings can help you solve the issue. You should also check your network to find the cause of the lag issues.

However, there are other possible causes for a timeout error that may require further troubleshooting.

Best solution:

https://docs.microsoft.com/en-us/windows/win32/wmisdk/troubleshooting-a-remote-wmi-connection#wmi-connection-timed-out

 8. WMI error:

“Failure to Connect” or “Connection could not be established”»

time blueQuick fix

If you are having trouble connecting to WMI on a remote system, you are probably facing a failure to connect. This problem can be caused by trying to connect to a system that does not support WMI, for example a computer running Starter, Basic, or Home edition. If this is the case, use a different system to connect to WMI.

The problem can also be the result of an attempt to connect to a namespace that requires an encrypted connection or a different authentication level. In this case, check the default process security levels and secure WMI namespaces.

Best solution:

https://docs.microsoft.com/en-us/windows/win32/wmisdk/troubleshooting-a-remote-wmi-connection#wmi-connection-timed-out

Choose your solution: Bugfix or replacement

prtg logo white

With PRTG you’ll never have to deal with
WMI errors again. Ever.

Trusted by 500,000 users and recognized
by industry analysts as a leader

trustpilot preview

“Fantastic network and infrastructure monitoring solution that is easy to deploy and easier still to use. Simply the best available.”

Read more reviews

gartner preview

“Software is absolutely perfect, Support is superior. Meets all needs and requirements, this is a must have solution if you are needing any form of monitoring.”

Read more reviews

pcmag preview

“The tool excels at its primary focus of being a unified infrastructure management and network monitoring service.”

Read more reviews


Had an issue with an Active Directory Server running server 2012R2. The Domain controller was erroring out on WMI and Active Directory DFS replication. We started getting WMI errors as shown below about a few days after it was put into production. The server also exhibited other issues such as not showing up in the server management dashboard and being unable to add or remove roles to the server.

The WMI Errors we were getting ones such as:

A provider, CommandLineEventConsumer, has been registered in the Windows Management Instrumentation namespace root\default to use the LocalSystem account. This account is privileged and the provider may cause a security violation if it does not correctly impersonate user requests.

Event provider attempted to register query «select * from MSFT_DASettingsIndication» whose target class «MSFT_DASettingsIndication» in //./root/standardcimv2 namespace does not exist. The query will be ignored.

*********ERROR LOG**********

48001 10:17:45 (0) ** WMIADAPTER: …………………………………………………………………………………………. 0.
48002 10:17:45 (0) **
48003 10:17:45 (0) ** 1 error(s) 0x8004100E — (WBEM_E_INVALID_NAMESPACE) Namespace specified cannot be found
48004 10:17:45 (0) **
48005 10:17:45 (0) ** 172 error(s) 0x80041002 — (WBEM_E_NOT_FOUND) Object cannot be found
48006 10:17:45 (0) ** => This error is typically a WMI error. This WMI error is due to:
48007 10:17:45 (0) ** — a missing WMI class definition or object.
48008 10:17:45 (0) ** (See any GET, ENUMERATION, EXECQUERY and GET VALUE operation failures).
48009 10:17:45 (0) ** You can correct the missing class definitions by:
48010 10:17:45 (0) ** — Manually recompiling the MOF file(s) with the ‘MOFCOMP ‘ command.
48011 10:17:45 (0) ** Note: You can build a list of classes in relation with their WMI provider and MOF file with WMIDiag.
48012 10:17:45 (0) ** (This list can be built on a similar and working WMI Windows installation)
48013 10:17:45 (0) ** The following command line must be used:
48014 10:17:45 (0) ** i.e. ‘WMIDiag CorrelateClassAndProvider’
48015 10:17:45 (0) ** — a WMI repository corruption.
48016 10:17:45 (0) ** In such a case, you must rerun WMIDiag with ‘WriteInRepository’ parameter
48017 10:17:45 (0) ** to validate the WMI repository operations.
48018 10:17:45 (0) ** Note: ENSURE you are an administrator with FULL access to WMI EVERY namespaces of the computer before
48019 10:17:45 (0) ** executing the WriteInRepository command. To write temporary data from the Root namespace, use:
48020 10:17:45 (0) ** i.e. ‘WMIDiag WriteInRepository=Root’
48021 10:17:45 (0) ** — If the WriteInRepository command fails, while being an Administrator with ALL accesses to ALL namespaces
48022 10:17:45 (0) ** the WMI repository must be reconstructed.
48023 10:17:45 (0) ** Note: The WMI repository reconstruction requires to locate all MOF files needed to rebuild the repository,
48024 10:17:45 (0) ** otherwise some applications may fail after the reconstruction.
48025 10:17:45 (0) ** This can be achieved with the following command:
48026 10:17:45 (0) ** i.e. ‘WMIDiag ShowMOFErrors’
48027 10:17:45 (0) ** Note: The repository reconstruction must be a LAST RESORT solution and ONLY after executing
48028 10:17:45 (0) ** ALL fixes previously mentioned.
48029 10:17:45 (2) !! WARNING: Static information stored by external applications in the repository will be LOST! (i.e. SMS Inventory)

**********Attempts at a Fix***********



The team attempted several different repairs of the WMI Repository. Including a manual recovery of it.

The WMI Repository must be rebuilt/repaired so that the Data Collector server can successfully report the host status to the connection broker.

For Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2, try to run the following:
winmgmt /verifyrepository
If the result is shown as inconsistent, go to step 2
winmgmt /salvagerepository
winmgmt /verifyrepository — to check again wmi repository had been repaired successfully

To fully rebuild the WMI Repository follow these steps:
Disable and stop the winmgmt service
Remove or rename C:\Windows\System32\wbem\repository
Enable and start the winmgmt service
Open a CMD prompt as Administrator
In the CMD prompt Navigate to C:\Windows\System32\wbem\
Run the following command:

‘for /f %s in (‘dir /b *.mof’) do mofcomp %s’

Note: This will take a minute or so to complete.
Now run the command:

‘for /f %s in (‘dir /b en-us\*.mfl’) do mofcomp en-us\%s’
Restart the Data Collector service

Lastly, open PERFMON to verify that all counters can be loaded. If PERFMON generates a popup error, please follow this Microsoft KB to fix it:

http://support.microsoft.com/kb/2554336/en-us

https://social.technet.microsoft.com/Forums/windows/en-US/8ed26d46-9994-4052-a307-5b071805aea8/wmi-corrupt-how-to-reinstallrepair?forum=winservergen

even running the verification winmgmt /verifyrepository showed the repository was just fine however the 2012R2 Server management console said otherwise. It was still giving errors such as

A provider, CommandLineEventConsumer, has been registered in the Windows Management Instrumentation namespace root\default to use the LocalSystem account. This account is privileged and the provider may cause a security violation if it does not correctly impersonate user requests.

Event provider attempted to register query «select * from MSFT_DASettingsIndication» whose target class «MSFT_DASettingsIndication» in //./root/standardcimv2 namespace does not exist. The query will be ignored.

<!——SOLUTION——!>



1. Run the cmdprompt as an administrator your current directory should be «C:\Windows\System32». I then did a «dir /a /S *.mof» which listed all the *.mof’s.

All are some type like «FFA7CB08D2CC2DB2D3973F6214D0CCDA.mof»

2. cd C:\Windows\System32\wbem\AutoRecover

3. for /f %s in (‘dir /b *.mof *.mfl’) do mofcomp %s

4. goto Servermanager, do Refresh.

After the solution was run the server manager was functioning properly again and we were able to add roles and features to the AD Server again.

Good Reads.

https://blogs.technet.microsoft.com/askperf/2014/08/08/wmi-repository-corruption-or-not/
http://support.microsoft.com/kb/2554336/en-us
https://social.technet.microsoft.com/Forums/windows/en-US/8ed26d46-9994-4052-a307-5b071805aea8/wmi-corrupt-how-to-reinstallrepair?forum=winservergen
https://technet.microsoft.com/en-us/library/cc755121(v=ws.11).aspx

Понравилась статья? Поделить с друзьями:
  • Wolfenstein ii the new colossus ошибка при запуске
  • Wolfenstein cyberpilot ошибка 110
  • Wmi provider host ошибка
  • Wolfenstein 2009 ошибка при запуске
  • Wolf ошибка 015