由于缺少性能计数器导致MSMQ WMI查询失败

时间:2014-04-08 18:48:46

标签: powershell wmi msmq

尝试从powershell执行以下查询时:

Get-WmiObject -query "Select * from Win32_PerfRawData_MSMQ_MSMQQueue"

我收到错误:

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

我已经诊断出MSMQ缺失的性能计数器,当我查看SYSTEM \ CurrentControlSet \ Services \ MSMQ \下的注册表时,我没有看到Performance键。

我在重新加载性能计数器时发现了以下Microsoft KB,但其中的步骤不起作用http://support.microsoft.com/default.aspx?scid=kb;EN-US;936493。当我运行“Unlodctr MSMQ”时,我收到错误:

Unable to open driver SYSTEM\CurrentControlSet\Services\MSMQ\Performance. Status: 2

然后,当我运行“Lodctr Mqperf.ini”时,我得到:

Unable to find initialization file Mqperf.ini

有谁知道我需要做些什么来重新初始化我的MSMQ性能计数器?

0 个答案:

没有答案