WMI (Windows Management Instrumentation) is a framework for managing Windows systems. It includes components like a repository, namespaces, classes, objects, and methods. WMI was introduced in Windows 2000 and is used for tasks like retrieving installed applications, adding users to groups, and rebooting computers remotely. It can be explored using tools like WMI Control and WBEMTest. Issues with WMI can be troubleshooted by checking error codes, logs, and using tools like WMIDiag to check health. Potential fixes include re-registering WMI modules, recompiling MOF files, and rebuilding the WMI repository as a last resort.
2. OVERVIEW
What is WMI?
Exploring WMI
Troubleshooting WMI
WMI Error Codes
Why do we care
3. WHAT IS WMI?
History
Uses
Components
Repository
Namespace
Class
Object
Method
4. HISTORY AND USES
Introduced and available in Windows Millennium , XP, Vista and later Operating system.
Was add on Windows 98, 94
Very handy for script and programming
Ex. Get the installed applications, add users to group, Reboot the computer remotely
16. WMI ERROR CODES
First, you need to check error codes.
All WMI Error starts with 0x8004xxx
Log Location:
C:WindowsSystem32Wbemlogs
17. WMIDIAG
Its a free tool, available in Microsoft
Download Link : https://blogs.technet.microsoft.com/askperf/2015/05/12/wmidiag-
2-2-is-here/
Looks whether WMI is healthy or not and within WMI like Namespaces are
healthy or corrupted
19. RECOMPILE WMI
MOFS
Bunch of Mofs needs to recompiled to
become WMI healthy.
This command re-compile all Mof files.
If there is problem with specific
namespace (like SMS,CIMv2)we can
take specific mofs and recompile it.
MOF files only become effective when
the files are compiled
Mofcomp.exe used to compile Mof files
20. REBUILD REPOSITORY
Stop WMI service and rename Repository folder under Wbem folder and start
WMI service.
It is the last option and it resets the repository fresh.
Very quick to do that but dont necessarily fix anything.
Need to find Root cause and fix the problem.
Can take backup of WMI and restore it to anyother computer to find what is
going on
21. WHY DO WE CARE?
Core Dependency for Servers and clients
SCCM Administrator console
Engine to access database
Storage of client data and settings