Get CPU usage for each core using the windows command line
问题 Is it possible to print the current CPU usage for each core in the system? This is what I have so far using powershell: Get-WmiObject -Query "select Name, PercentProcessorTime from Win32_PerfFormattedData_PerfOS_Processor" 回答1: It can be be done using the following powershell command: (Get-WmiObject -Query "select Name, PercentProcessorTime from Win32_PerfFormattedData_PerfOS_Processor") | foreach-object { write-host "$($_.Name): $($_.PercentProcessorTime)" }; Also you could create a file