The class name 'Win32_OperatingSystem' did not return any valid instances


I have following alert on Windows server 2012R2.Please let me know if anyone have a solution.
Microsoft.Windows.Server.DiskState.vbs : The class name ‘Win32_OperatingSystem’ did not return any valid instances. Please check to see if this is a valid WMI class name… Invalid class


Log Name: Operations manager

Source: Health Service Script

Event ID: 4001

In my experience, this is usually down to one of two causes:

  1. Damage to the WMI repository (most likely).
  2. Security customization to WMI made by hardware manufacturer's management products
Try running winmgmt /verifyrepository to see if it's reporting as inconsistent. If so, you'll probably need to recover/rebuild WMI. You can also check the Application event log for events reported from source "Microsoft-Windows-WMI"

There are many articles listing how to rebuild the WMI repository, though since some of them are fast (but unsupported by Microsoft) you may want to check if you’ve imported any custom WMI providers before you go with the common fix of renaming/deleting the repo folder. goes into a fair amount of detail on some options - note that since this is on a 2012 box you will need to follow a specific section to check that reseting the repo (if necessary) won’t damage the failover cluster WMI provider.