MSMQ WMI Query Failing Due to Missing Performance Counters

萝らか妹 提交于 2020-01-04 02:34:11

问题


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?

来源:https://stackoverflow.com/questions/22945713/msmq-wmi-query-failing-due-to-missing-performance-counters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!