PowerShell – WmiObject and a corrupt repository

If repository is found to be inconsistent, for Vista and newer, run from elevated command prompt:

Winmgmt /salvagerepository

Note this command will take the content of the inconsistent repository and merge it into the rebuilt repository if it is readable

If the above doesn’t work, then run:

Winmgmt /resetrepository

Note this will reset repository to the initial state when the OS was first installed

~pouyan

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.