具有区域设置无关ID的get-counter

时间:2014-01-19 03:33:01

标签: powershell performancecounter

我试图通过cmdlet get-counter以与语言环境无关的方式访问以下反向路径:

\Memory\Pool Nonpaged Bytes

我按照this thread中的说明归档了此内容。所以我在注册表中查找了反向路径的两个ID并得到\4\58
但不幸的是,这条道路不起作用。我总是收到错误消息

The specified performance-indicator could not be found

来自另一个帖子\238(_Total)\6的路径完美无缺!但是对于我的路径,我只能\4\*列出集合中的所有计数器。

我做错了什么?

1 个答案:

答案 0 :(得分:2)

@克里斯,

PowerShell Magazine不久前发表了一篇文章。

http://www.powershellmagazine.com/2013/07/19/querying-performance-counters-from-powershell/

托比亚斯展示了一种将计数器名称翻译为身份证号码的方法。