FolderRisk: Do not touch
Repository C:\Windows\System32\wbem\Repository
WMI repository (CIM database): the set of files forming the database of WMI classes and instances.
What it’s for
The WMI repository, or CIM repository, stores the definitions of WMI classes and their meta-information. It is not a single file but a set of files in the Repository folder (notably OBJECTS.DATA, INDEX.BTR and the MAPPING*.MAP files) that only make sense together.
What it contains
- The CIM database files: data, indexes, mapping tables.
- The WMI classes and namespaces registered by Windows and by software (compiled MOF).
Risks and best practices
- Do not delete the repository as a first move: you risk damaging the system or applications that registered their classes in it.
- Start with
winmgmt /verifyrepository. If it reports an inconsistency,winmgmt /salvagerepositoryrebuilds the repository by merging the readable content. winmgmt /resetrepositoryreturns the repository to its install-time state. Keep it as a last resort, after a backup (winmgmt /backup): classes added by applications may disappear.- A faulty repository shows up as “Invalid class” or “Provider load failure” errors, or as WMI queries that fail.
Useful commands
:: Verify the repository (as administrator)winmgmt /verifyrepository
:: If an inconsistency is reported: repair, keeping readable content (as administrator)winmgmt /salvagerepository
:: Back up the repository before a last resortwinmgmt /backup C:\Temp\wmi-repository.bak
:: Last resort: return to the initial state (as administrator, after a backup)winmgmt /resetrepository