【发布时间】:2020-05-17 23:41:33
【问题描述】:
有没有办法使用 PowerShell设置性能计数器的值?
【问题讨论】:
标签: powershell performancecounter
有没有办法使用 PowerShell设置性能计数器的值?
【问题讨论】:
标签: powershell performancecounter
是的。
$counter = (New-Object -TypeName System.Diagnostics.PerformanceCounter -ArgumentList ("CategoryName", "CounterName", "InstanceName", $false))
$counter.RawValue = 0
【讨论】:
$counter = New-Object System.Diagnostics.PerformanceCounter CategoryName, CounterName, InstanceName, $false