A process I–must–use has a bugs every few usages, that changes considerably its resting state. When I’m not using the program, normally the process keep switching from 0 to 1% every 1-3 seconds, but when it bugs it seem to average between 15 & 22%, also switching every few seconds (IIRC it takes longer to fluctuate when bugged). When I’m using the program it takes a non-negligible CPU % but that’s as expected and I have no clue whether it’s bugged or not, I have never noticed any difference between the 2 states in active usage.
When I suspect there’s a bug I’ve been loading the task manager, but that take some seconds and it slows down the system, I suspect it would be quicker to check the process average CPU usage (%) using a powershell script; it would use as a parameter the process image name over a few seconds, perhaps every 1/2 seconds 10 times.
You did not ask any question. However, instead of trying to tinker around a workaround I’d highly recommend to reach out to the manufacturer of the app and file a bug report. Especially if that’s a paid app.
In preparation for that you could use the Windows Performace Monitor to collect some data.
You may run the task manager permamently minimized. Then you just need to bring it to front. It should take much less time. But if starting the task manager already slows your system down noticably you may have other issues as well.
Regardless of all that: This forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.
We actually expect you to make an own attempt at the first place to get your task done or to solve your problem. If you have done so already please document here what exactly you have done and show your code. Then we probably might be able to help you step further.