i want a script to capture the current CPU usage for every process above 0 CPU usage.
i create this script but i see that the script doesn’t report a right CPU usage like task manager show because it doesn’t calculated the processor threads so i show 99 CPU usage. i found this code that show the CPU count [System.Environment]::ProcessorCount
my question is how do i insert the code into the cookedvalue results that it will reflect like task manager?