WMI Service error occurs when SQL Server 2008 is installed.
Solution:
1. Recreate the damaged Windows Management Instrumentation (Wmi) Service (Test passed)
@ 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
Save the code in bat format and then run it on the server.
2. Another Method
1. Click Start and right-click my computer.
2. Click Manage on the shortcut menu.
3. In the left pane of the Computer Management Console, double-click "services and applications ".
4. Under services and applications, click Services.
5. In the right pane of the Computer Management Console, right-click Windows Management Instrumentation.
6. Click Stop on the shortcut menu.
7. Start Windows Resource Manager and find the % SystemRoot % system32wbemrepository folder.
8. Delete all files in the % SystemRoot % system32wbemrepository folder.
9. restart the computer. Restart the computer.