如何以另一种语言而不是英语获取 .Net 方法信息 PerformanceCounterCategory CategoryHelp
我的母语不是英语。我希望你明白我的意思。 我编写的一些 Powershell 代码
显示计数器和类别的描述
$n=@( ("Memory","Available MBytes"),
("Memory","Free System Page Table Entries"),
)
$ppt = New-Object System.Diagnostics.PerformanceCounter
$ppt2 = New-OBject System.Diagnostics.PerformanceCounterCategory
foreach( $it in $n){
$ppt.categoryName=$it[0]
$ppt.counterName=$it[1]
$ppt2.categoryName =$it[0]
$var = $ppt2.categoryName
$var2 = $ppt.counterName
$ppt.instanceName =''
echo "CategoryName : $var "
echo ( "Category Help : " + $ppt2.CategoryHelp)
echo "CounterName : $var2"
echo ("CounterHelp : " + $ppt.counterHelp)
echo ""
}
This gives me in CounterHelp and Category Help in English Description. How to get a German Description of that Counter or Category even i use English Windows. I have tried on a German Windows but it didn't work. If it is not possible on English windows. What did i wrong on German Windows? ThxI am not native English Speaker . I hope you understand what i mean.
A bit Powershell code that i wrote
Show Descriptions of Counters and Category
$n=@( ("Memory","Available MBytes"),
("Memory","Free System Page Table Entries"),
)
$ppt = New-Object System.Diagnostics.PerformanceCounter
$ppt2 = New-OBject System.Diagnostics.PerformanceCounterCategory
foreach( $it in $n){
$ppt.categoryName=$it[0]
$ppt.counterName=$it[1]
$ppt2.categoryName =$it[0]
$var = $ppt2.categoryName
$var2 = $ppt.counterName
$ppt.instanceName =''
echo "CategoryName : $var "
echo ( "Category Help : " + $ppt2.CategoryHelp)
echo "CounterName : $var2"
echo ("CounterHelp : " + $ppt.counterHelp)
echo ""
}
This gives me in CounterHelp and Category Help in English Description. How to get a German Description of that Counter or Category even i use English Windows. I have tried on a German Windows but it didn't work. If it is not possible on English windows. What did i wrong on German Windows? Thx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要德语版的 Windows。我使用的是德语Windows 7版本。
要检索类别和计数器的德语帮助文本,您必须使用德语名称。
更改:
为:
您将在注册表中找到英文类别和计数器名称:
德语名称:
You need the german version of Windows. I use the german Windows 7 version.
To retrieve the german help text of the category and counter you must use the german names.
change:
to:
You will find the english category and counter names in the registry:
The german names in: