When trying to execute the following query from powershell:
Get-WmiObject -query "Select * from Win32_PerfRawData_MSMQ_MSMQQueue"
I receive the error:
Get-WmiObject : Invalid query
At line:1 char:14
+ Get-WmiObject <<<< -query "Select * from Win32_PerfRawData_MSMQ_MSMQQueue"
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
I have diagnosed this to the performance counters for MSMQ missing, when I look in the registry under SYSTEM\CurrentControlSet\Services\MSMQ\ I do not see a Performance key.
I found the following Microsoft KB on reloading the performance counters but the steps in it do not work http://support.microsoft.com/default.aspx?scid=kb;EN-US;936493. When I run "Unlodctr MSMQ" I get the error:
Unable to open driver SYSTEM\CurrentControlSet\Services\MSMQ\Performance. Status: 2
Then when I run "Lodctr Mqperf.ini" I get:
Unable to find initialization file Mqperf.ini
Does anyone know what I need to do to reinitialize my MSMQ performance counters?