WMI performance monitors not available

0

On a Windows Server 2008 R2 Datacenter (Service Pack) I am trying to query the following counters, but getting the error 'Invalid Query' in wbemtest.exe

Win32_PerfRawData_PerfOS_Memory
Win32_PerfRawData_PerfOS_Processor

They are not even turning up in the list of objects! I am new to this, so my apologies if you feel there is information missing. I will make it available as the questions arrive.

The result of:

Get-WmiObject -Query "Select * from Win32_PerfRawData_PerfOS_Memory"

is as follows:

Get-WmiObject : Invalid query "Select * from Win32_PerfRawData_PerfOS_Memory"
At line:1 char:1
+ Get-WmiObject
+ ~~~~~~~~~~~~~
+ CategoryInfo          : InvalidArgument: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

v vv cvvcv

Posted 2016-02-05T11:10:26.637

Reputation: 1

Which version of Windows are you using? What's the actual query you are putting using wbemtest? If you're on a recent Windows, open a PowerShell prompt "as administrator", and run Get-WmiObject -Query "Select * from Win32_PerfRawData_PerfOS_Memory" -- does that work? – Ƭᴇcʜιᴇ007 – 2016-02-05T13:36:29.917

Answers

0

Backup %windir%\system32\wbem folder, and switch to %windir%\system32\wbem and run mofcomp Wmi.mof since this is the MOF file for this Win32_PerfRawData class. If still fails, consider to rebuild WMI Repository: https://blogs.technet.microsoft.com/askperf/2009/04/13/wmi-rebuilding-the-wmi-repository/

Kevin Tu

Posted 2016-02-05T11:10:26.637

Reputation: 89

Can you expand upon how to rebuild the repository? Please read [answer]. – Burgi – 2016-06-29T07:37:21.083