Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

cpu utilization command in powershell

$
0
0

Hi All,

I want to get the CPU Utilization Percentage from my system.

 when i am using this command

  $DateTime =Get-Date-Format G
        $ProcessorPercentage =(Get-WmiObjectWin32_PerfFormattedData_PerfOS_Processor-ComputerName $Server -filter "Name='_Total'").PercentProcessorTimeWrite-Output"$Server $DateTime`: $ProcessorPercentage"

using this script i am  getting some value,But it is not the exact value  same as in  Task Manager Performance Tab.

Can any one help on this..

Regards,

Phani Kumar R.


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>