Im using Windows10, i need to check CPU usage and memory usage for a power shell script which is scheduled to run every 3mins. I have created a data collector set with following details
I use perfmon, to monitor CPU Usage i have added:
- \process(Powershell_12345)%ProcessorTime
to monitor memory usage i have added:
- \Memory%Committed bytes in Use
- \Memory%Committed bytes
But problem is every time powershell script gets triggered through scheduler a new PID is created and the process has names concatenated with PID like powershell_ If i add the powershell process only till that thread is used, it would get monitored and not for entire day
How do i use perfmon to monitor powershell.exe for a day ?