I need to find out total processor time , but I DONT WANT TO USE ANY PERFORMANCE COUNTER using WMI script
is there any possibilities?
The corresponding performance counter is : \Processor(_Total)\% Processor Time
You can use the following DOS command line within an executeShellCommandToVariable step in an agent procedure and pull the result back in a variable:
wmic cpu get loadpercentage|find /v "LoadPercentage"
Kaseya Professional Services
"wmic cpu get loadpercentage|find /v "LoadPercentage"
not return any thing .... why?
Use WMI Code Creator. You can download it from the MS site. With that application you can create VB code getting data from WMI classes.
Created many codes within seconds.
If the WMIC command line I posted is not returning anything try running just WMIC by itself without any of the additional command line stuff and see what it returns. It may provide some insight, and on some systems WMIC the first time you run it needs to initialize things. While I have not used WMI Code Creator it sounds like Microsofts Scriptomatic tool or maybe is a newer renamed version. Check to make sure the WMI Service is running and then take a look at some of these useful troubleshooting tools/links: