How to rebuild WMI repository for Windows XP/2003
Windows Server 2003을 사용하고 계실 때, WMI 쿼리 실행 시 오류가 여러 상황에서 발생한다면 WMI Repository Rebuild를 고려해보시기 바랍니다.
For Windows XP and Windows Server 2003, there are no built in switches to rebuild the Repository, so you must do it manually.
1. Change startup type to Window Management Instrumentation (WMI) Service to disabled
2. Stop the WMI Service; you may need to stop IP Helper Service first or other dependent services before it allows you to stop WMI Service
3. Rename the repository folder: C:\WINDOWS\system32\wbem\Repository to Repository.old
4. Open a CMD Prompt with elevated privileges
5. CD windows\system32\wbem
6. for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s
7. Set the WMI Service type back to Automatic and start WMI Service
8. cd /d c:\ ((go to the root of the c drive, this is important))
9. for /f %%s in ('dir /s /b *.mof *.mfl') do mofcomp %%s
10. Reboot the server
[참고 사이트]
http://blogs.technet.com/b/askperf/archive/2009/04/13/wmi-rebuilding-the-wmi-repository.aspx