use typeperf /? or technet (http://technet.microsoft.com/en-us/library/bb490960.aspx) for usage information;
with powershell we have Get-Counter cmdlet but the use of * wildchar and letters at the same time is not supported on windows 2003 and XP;
best sollution i found was to use WMI from powershell:
Get-WmiObject win32_PerfFormattedData_PerfProc_Process -Filter "Name like 'powersh%'" | Select-Object Name, PercentProcessorTime
Name PercentProcessorTime
---- --------------------
powershell 98
powershell#1 0
No comments:
Post a Comment